[Bug 242080] reproducible net-snmp crash, includes gdb debug

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Nov 19 13:45:55 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242080

            Bug ID: 242080
           Summary: reproducible net-snmp crash, includes gdb debug
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs at FreeBSD.org
          Reporter: mwlucas at michaelwlucas.com

I can reliably crash net-snmp with an snmpset. 

$ uname -a
FreeBSD freebsdtest 12.0-RELEASE-p10 FreeBSD 12.0-RELEASE-p10 GENERIC  amd64

$ pkg info net-snmp
net-snmp-5.7.3_20,1
Name           : net-snmp
Version        : 5.7.3_20,1
Installed on   : Wed Oct  9 15:22:24 2019 EDT
...

Detail:

$ sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 0

$ snmpget freebsd IP-MIB::ipForwarding.0
IP-MIB::ipForwarding.0 = INTEGER: notForwarding(2)

$ snmpset freebsd IP-MIB::ipForwarding.0 i 1
Timeout: No Response from freebsd

Yep, the agent is dead:

$ pgrep snmpd
$

The sysctl change took place, however:

$ sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 1

I can restart the agent and reverse the change, but snmpd crashes
again.

Debug on core file:

...
Reading symbols from /usr/local/sbin/snmpd...
(gdb) core /snmpd.core
[New LWP 100412]
Core was generated by `/usr/local/sbin/snmpd -p /var/run/net_snmpd.pid'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000800413426 in netsnmp_arch_ip_scalars_sysctl (
    access_module=0x8002d8801 "access:ipForwarding",
    mib=0x80043dec0 <ipForwarding_mib>, mib_len=4, old_value=0x0,
    new_value=0x7fffffffd9c0) at ip-mib/data_access/scalars_sysctl.c:45
45          *old_value = oldint;
(gdb) quit

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list