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 <
bvass...@users.sourceforge.net> 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/
>

Attachment: T0221snmpv3bulkbig_simple
Description: Binary data

_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to