All,
I've been having a
problem with snmptrapd crashing after successfully logging and forwarding v3
traps. I have no problems with version 2 or 1. If I turn forwarding off,
snmptrapd does not crash with v3 traps. My initial tests were run on net-snmp
version 5.3.0.1. I found online a mention of the fact that there were SNMP v3
problems in 5.3.0.1 so I tried using net-snmp version 5.4.2.1 and still
encountered the same problem. Then I put a return at the beginning of
usm_free_usmStateReference, recompiled everything and I no longer see a
segfault.
Below is an excerpt
from the command I issued, the backtrace and my snmptrapd.conf file. I could
not find this issue resolved in the bugtracker although I did find a similar
issue that is still open:
http://sourceforge.net/tracker/index.php?func=detail&aid=1644670&group_id=12694&atid=112694
Any help would be
greatly appreciated.
Thanks,
Felix
snmptrap -d -e
0x0102030405 -v 3 -M /usr/share/snmp/mibs -m ALL -l noauthnoPriv -u traptest
192.168.0.141 "" .1.3.6.1.3.94.0.4 connUnitEventId i 1
Core was generated by `/usr/sbin/snmptrapd -f -M
/usr/share/snmp/mibs -m ALL -c /etc/snmptrapd.conf -L'.
Program terminated
with signal 11, Segmentation fault.
#0 0x47bf3f17 in free () from
/lib/libc.so.6
(gdb) bt
#0 0x47bf3f17 in free () from
/lib/libc.so.6
#1 0x47f3a127 in usm_free_usmStateReference () from
/usr/lib/libnetsnmp.so.10
#2 0x00000007 in ?? ()
#3 0x081b8650 in ??
()
#4 0x47cc809b in snmp_input () from /usr/lib/libnetsnmptrapd.so.10
#5
0x47f17b09 in ?? () from /usr/lib/libnetsnmp.so.10
#6 0x0816c470 in ??
()
#7 0x081b8650 in ?? ()
#8 0x542abe62 in ?? ()
#9 0x08178f38 in ??
()
#10 0x081b6280 in ?? ()
#11 0xff8b6518 in ?? ()
#12 0x08178f38 in ??
()
#13 0xff8b6528 in ?? ()
#14 0x47bf5a69 in malloc () from
/lib/libc.so.6
###########################################################################
#
#
snmptrapd.conf
#
# - created by the snmpconf configuration
program
#
###########################################################################
#
SECTION: Output formatting for traps received.
#
# Output from snmptrapd
is formatted according to the
# rules defined by the formatting
configuration directives.
# format1: How SNMPv1 traps are
formatted.
# See the snmptrapd.conf manual page for format string
details.
# arguments: formatstring
# format2: How SNMPv2 and SNMPv3 traps are
formatted.
# See the snmptrapd.conf manual page for format string
details.
# arguments: formatstring
authCommunity log,execute,net
public
disableAuthorization yes
#createUser informtest MD5 mypassword DES
mypassword
#authUser log,net informtest
createUser -e 0x0102030405 traptest MD5 mypassword
DES myotherpassword
authUser log,execute,net traptest
format1 %V\n% Agent Address: %A \n PDU Source
Hostname: %B \n Date: %#02.2h:%#
02.2j:%#02.2k %#02.2m/%#02.2l/%#y \n
Enterprise OID: %N \n Trap Type: %W \n Tr
ap Sub-Type: %q \n
Community/Infosec Context: %P \n Uptime: %#T \n Description
: %W \n PDU
Attribute/Value Pair Array:\n%v \n -------------- \n
format2 %V\n% PDU Source Hostname: %B \n Date:
%#02.2h:%#02.2j:%#02.2k %#02.2m
/%#02.2l/%#y \n Community/Infosec Context: %P
\n PDU Attribute/Value Pair Arra
y:\n%v \n -------------- \n
snmpTrapdAddr 192.168.0.141:162
forward
default a.b.c.d (I've commented out the actual
address I'm forwarding to)
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
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.