Re: [net-snmp:patches] #1388 patch for bug 2923: snmpv3 bulkget errors result in double free core dump

Bill Fenner <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <CAF4SogarZeSgb4ORt6gB3CoUxfogLK016tEJk45NDqPpyJLj3Q@mail.gmail.com>
The memory leak is gone in the current V5-8-patches. I have not dug into
trying to bisect which change fixed it.

  Bill


On Tue, May 14, 2019 at 7:01 AM Bill Fenner <[email protected]> wrote:

> Perhaps getbulk no longer dumps core, but I can not get it to return
> anything but GENERR any more, and, it seems to leak memory.
>
> Any "large enough" request seems to fail in this way, e.g., snmpbulkget -v
> 3 ... -Cn 5 -Cr 50 sysUpTime sysUpTime sysUpTime sysUpTime sysUpTime .1
>
> This is particularly frustrating because code was added to 5.8 to rebuild
> a getbulk reply if it's too big.  But there was already code to not build
> the PDU too big, it's just not taking the v3 header into account properly
> (that's my best guess, at least).  So now there are two different
> mechanisms to send a "right-size" reply and they both don't work.  Around
> 5.8 release time I was working with Robert Story to fix this, but that
> effort kind of petered out and Robert's work didn't make it into git.
>
> Can anyone get getbulk to work in the current 5.8-patches with SNMPv3?
>
> I've attached a test script with 504 failing test cases when I run it
> against an unmodified V5-8-patches branch, and net-snmp leaks about a meg
> of RAM during the test.  This is an adaptation of my internal test to the
> net-snmp test framework; the complete test would use all supported values
> for -l, -a, -x but for now this is the simplest one using nanp.
>
> Thanks,
>   Bill
>
>
>
>
> On Wed, Apr 10, 2019 at 10:25 AM Bart Van Assche <
> [email protected]> wrote:
>
>> This patch has been applied on the v5.8 and master branches. Thanks for
>> the patch!
>> ------------------------------
>>
>> * [patches:#1388] <https://sourceforge.net/p/net-snmp/patches/1388/>
>> patch for bug 2923: snmpv3 bulkget errors result in double free core dump*
>>
>> *Status:* open
>> *Group:* backport-needed
>> *Created:* Tue Mar 05, 2019 09:56 AM UTC by Sam Tannous
>> *Last Updated:* Tue Mar 05, 2019 09:56 AM UTC
>> *Owner:* nobody
>> *Attachments:*
>>
>>    - v3doublefree2.patch
>>    <https://sourceforge.net/p/net-snmp/patches/1388/attachment/v3doublefree2.patch>
>>    (14.2 kB; application/octet-stream)
>>
>> This is a patch for https://sourceforge.net/p/net-snmp/bugs/2923/ when
>> almost any v3 bulkget
>> error will cause a core dump of snmpd.
>> ------------------------------
>>
>> Sent from sourceforge.net because you indicated interest in
>> https://sourceforge.net/p/net-snmp/patches/1388/
>>
>> To unsubscribe from further messages, please visit
>> https://sourceforge.net/auth/subscriptions/
>>
>

_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.