Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core was generated by `snmpd -f -c /cfs/system/snmpd.conf' Program terminated with signal SIGSEGV, Segmentation fault #15

Closed
AmitSharma1094 opened this issue Sep 26, 2019 · 3 comments

Comments

@AmitSharma1094
Copy link

AmitSharma1094 commented Sep 26, 2019

Core was generated by `snmpd -f -c /cfs/system/snmpd.conf'

I am using net-snmp 5.8 as version and crashed observed after 2 hours of snmp query. Please find test script attached.
testscript.txt

bt result:-

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Core was generated by `snmpd -f -c /cfs/system/snmpd.conf'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xf7e6da55 in inetCidrRouteTable_container_load () from /lib/libnetsnmpmibs.so.35
(gdb) bt
#0  0xf7e6da55 in inetCidrRouteTable_container_load () from /lib/libnetsnmpmibs.so.35
#1  0xf7e6cbc2 in ?? () from /lib/libnetsnmpmibs.so.35
#2  0xf7f3094f in ?? () from /lib/libnetsnmpagent.so.35
#3  0xf7f312a2 in netsnmp_cache_helper_handler () from /lib/libnetsnmpagent.so.35
#4  0xf7f3b7e2 in netsnmp_call_handler () from /lib/libnetsnmpagent.so.35
#5  0xf7f31710 in netsnmp_instance_helper_handler () from /lib/libnetsnmpagent.so.35
#6  0xf7f3b7e2 in netsnmp_call_handler () from /lib/libnetsnmpagent.so.35
#7  0xf7f337f6 in netsnmp_serialize_helper_handler () from /lib/libnetsnmpagent.so.35
#8  0xf7f3b7e2 in netsnmp_call_handler () from /lib/libnetsnmpagent.so.35
#9  0xf7f3b8c7 in netsnmp_call_handlers () from /lib/libnetsnmpagent.so.35
#10 0xf7f43f81 in handle_var_requests () from /lib/libnetsnmpagent.so.35
#11 0xf7f4421f in handle_getnext_loop () from /lib/libnetsnmpagent.so.35
#12 0xf7f446b3 in handle_pdu () from /lib/libnetsnmpagent.so.35
#13 0xf7f447f5 in netsnmp_handle_request () from /lib/libnetsnmpagent.so.35
#14 0xf7f4495b in handle_snmp_packet () from /lib/libnetsnmpagent.so.35
#15 0xf7d65283 in ?? () from /lib/libnetsnmp.so.35
#16 0xf7d65994 in _sess_read () from /lib/libnetsnmp.so.35
#17 0xf7d659d3 in snmp_sess_read2 () from /lib/libnetsnmp.so.35
#18 0xf7d65a1a in snmp_read2 () from /lib/libnetsnmp.so.35
#19 0x0804ac1b in ?? ()
#20 0x0804a6ed in ?? ()
#21 0xf7b1be41 in __libc_start_main () from /lib/libc.so.6
#22 0x0804a7d5 in ?? ()
@bvanassche
Copy link
Contributor

bvanassche commented Sep 26, 2019

If the official v5.8 release was used during this test, please repeat this test with the latest version of the v5.8-patches branch (https://github.com/net-snmp/net-snmp/tree/V5-8-patches).

@AmitSharma1094
Copy link
Author

AmitSharma1094 commented Sep 26, 2019

snmpd.conf

SF01V_SO01_SFOS 18.0.0 EAP0-Preview2# cat /cfs/system/snmpd.conf 
agentAddress udp:161,udp6:161
sysName testing
syslocation India
sysContact BLR
sysDescr testing
sysObjectID 1.3.6.1.4.1.2064
rocommunity 'public' 192.168.57.3
CreateUser 'admin' MD5 "qwertyuiopasdfghjkl1234567" AES "12345678901234567890"
rouser 'admin'
CreateUser 'admin1' SHA256 "qwertyuiopasdfghjkl1234567" DES "12345678901234567890"
rouser 'admin1'
CreateUser 'admin2' SHA512 "qwertyuiopasdfghjkl1234567"
rouser 'admin2'
trapsess -v2c 192.168.57.3 -c 'public'
trapsess -v 3 -Ci -u "admin" -a MD5 -A "qwertyuiopasdfghjkl1234567" -x AES -X "12345678901234567890" -l authPriv 192.168.57.3
trapsess -v 3 -Ci -u "admin1" -a SHA256 -A "qwertyuiopasdfghjkl1234567" -x DES -X "12345678901234567890" -l authPriv 192.168.57.3
trapsess -v 3 -Ci -u "admin2" -a SHA512 -A "qwertyuiopasdfghjkl1234567" -l authNoPriv 192.168.57.3

@AmitSharma1094
Copy link
Author

AmitSharma1094 commented Oct 1, 2019

yes, this issue is exist in v5.8-patches.
i fix this issue. I am attaching the code changes which i done to solve this issue.
core-was-generated-by-snmpd.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants