svn commit: r310729 - head/contrib/bsnmp/lib

Ngie Cooper (yaneurabeya) yaneurabeya at gmail.com
Sat Dec 31 00:39:59 UTC 2016


> On Dec 28, 2016, at 16:20, Ngie Cooper <ngie at FreeBSD.org> wrote:
> 
> Author: ngie
> Date: Thu Dec 29 00:20:03 2016
> New Revision: 310729
> URL: https://svnweb.freebsd.org/changeset/base/310729
> 
> Log:
>  Prevent improper memory accesses after calling snmp_pdu_free and snmp_value_free
> 
>  snmp_pdu_free: set pdu->nbindings to 0 to limit the damage that
>  could happen if a pdu was reused after calling the function, and
>  as both stack and heap allocation types are used in contrib/bsnmp
>  and usr.sbin/bsnmpd.
> 
>  snmp_value_free: NULL out value->v.octetstring.octets after calling
>  free on it to prevent a double-free from occurring.

This commit identified a bug in the bsnmptools implementation:

% bsnmpwalk -s 172.16.45.130:161
sysDescr.0 = fbsd12 3045910434 FreeBSD 12.0-CURRENT
Bus error (core dumped)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20161230/9bb88219/attachment.sig>


More information about the svn-src-head mailing list