snmpwalk -v3 -u usecureUser localhost:4160 .1.3.6.1
gdb output:
gdb ./snmp-agent
GNU gdb (GDB) 16.1
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type “show copying” and “show warranty” for details.
This GDB was configured as “x86_64-pc-linux-gnu”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type “help”.
Type “apropos word” to search for commands related to “word”…
Reading symbols from ./snmp-agent…
(gdb) run
Starting program: /home/tola/Documents/workspace_micran/snmp-agent-example/build/snmp-agent
This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.archlinux.org
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add ‘set debuginfod enabled on’ to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/usr/lib/libthread_db.so.1”.
[New Thread 0x7ffff7fc06c0 (LWP 695372)]
20250122.15:20:47: 140737353484096: (3)DEBUG : getBootCounter: found entry (file) (engine id) (boot counter): (snmpv3_boot_counter), ( 80 00 13 70 05 61 72 63 68 10 40 …p.arch.@
), (7)
20250122.15:20:47: 140737353484096: (5)INFO : saveBootCounter: Saved counter (file) (engine id) (boot): (snmpv3_boot_counter), ( 80 00 13 70 05 61 72 63 68 10 40 …p.arch.@
), (8)
20250122.15:20:47: 140737353484096: (6)INFO : AuthPriv: Added auth protocol (id): (3)
20250122.15:20:47: 140737353484096: (6)INFO : AuthPriv: Added auth protocol (id): (4)
20250122.15:20:47: 140737353484096: (6)INFO : AuthPriv: Added auth protocol (id): (5)
20250122.15:20:47: 140737353484096: (6)INFO : AuthPriv: Added auth protocol (id): (6)
20250122.15:20:47: 140737353484096: (6)INFO : AuthPriv: Added auth protocol (id): (7)
20250122.15:20:47: 140737353484096: (6)INFO : AuthPriv: Added auth protocol (id): (2)
20250122.15:20:47: 140737353484096: (6)INFO : AuthPriv: Added priv protocol (id): (2)
20250122.15:20:47: 140737353484096: (6)INFO : AuthPriv: Added priv protocol (id): (4)
20250122.15:20:47: 140737353484096: (6)INFO : AuthPriv: Added priv protocol (id): (20)
20250122.15:20:47: 140737353484096: (6)INFO : AuthPriv: Added priv protocol (id): (21)
20250122.15:20:47: 140737353484096: (3)INFO : AuthPriv: Added default Auth and Priv protocols.
20250122.15:20:47: 140737353484096: (3)DEBUG : MibContext: adding MIB object (context)(oid): (), (1.3.6.1.3.100.2.1.0)
20250122.15:20:47: 140737353484096: (1)DEBUG : UsmUserTable: add row with index: (11.128.0.19.112.5.97.114.99.104.16.64.12.117.110.115.101.99.117.114.101.85.115.101.114)
20250122.15:20:47: 140737353484096: (1)DEBUG : UsmUserTable: add row with index: (11.128.0.19.112.5.97.114.99.104.16.64.3.77.68.53)
20250122.15:20:47: 140737353484096: (3)DEBUG : MibContext: adding MIB object (context)(oid): (), (1.3.6.1.6.3.15.1.1)
20250122.15:20:47: 140737353484096: (3)DEBUG : MibContext: adding MIB object (context)(oid): (), (1.3.6.1.6.3.15)
20250122.15:20:47: 140737353484096: (3)DEBUG : MibContext: adding MIB object (context)(oid): (), (1.3.6.1.6.3.10.2.1)
[New Thread 0x7ffff7f1d6c0 (LWP 695373)]
20250122.15:20:47: 140737353484096: (1)DEBUG : TaskManager: thread started
[New Thread 0x7ffff7f0c6c0 (LWP 695374)]
20250122.15:20:47: 140737353484096: (1)DEBUG : TaskManager: thread started
[New Thread 0x7ffff79236c0 (LWP 695375)]
20250122.15:20:47: 140737353484096: (1)DEBUG : TaskManager: thread started
[New Thread 0x7ffff79126c0 (LWP 695376)]
20250122.15:20:47: 140737353484096: (1)DEBUG : TaskManager: thread started
20250122.15:20:47: 140737353484096: (3)DEBUG : MibContext: adding MIB object (context)(oid): (), (1.3.6.1.6.3.16.1)
20250122.15:20:47: 140737353484096: (3)DEBUG : MibContext: adding MIB object (context)(oid): (), (1.3.6.1.6.3.12.1.5.0)
20250122.15:20:47: 140737353484096: (3)DEBUG : MibContext: adding MIB object (context)(oid): (), (1.3.6.1.6.3.12.1.4.0)
Thread 1 “snmp-agent” received signal SIGSEGV, Segmentation fault.
0x000055555566a448 in Snmp_pp::v3MP::snmp_parse (this=this@entry=0x0,
snmp_session=snmp_session@entry=0x7fffffffd650, pdu=pdu@entry=0x55555572fa50,
inBuf=,
inBuf@entry=0x7fffffffab20 “0>\002\001\0030\021\002\004QrgN\002\003”,
inBufLength=, securityEngineID=…, securityName=…,
contextEngineID=…, contextName=…, securityLevel=@0x7fffffffa3a0: 1,
msgSecurityModel=@0x7fffffffa848: 3, spp_version=@0x7fffffffa844: Snmp_pp::version3,
from_address=…) at mp_v3.cpp:1010
warning: 1010 mp_v3.cpp: No such file or directory
(gdb) bt
#0 0x000055555566a448 in Snmp_pp::v3MP::snmp_parse (this=this@entry=0x0, snmp_session=snmp_session@entry=0x7fffffffd650, pdu=pdu@entry=0x55555572fa50, inBuf=,
inBuf@entry=0x7fffffffab20 “0>\002\001\0030\021\002\004QrgN\002\003”, inBufLength=, securityEngineID=…, securityName=…, contextEngineID=…, contextName=…,
securityLevel=@0x7fffffffa3a0: 1, msgSecurityModel=@0x7fffffffa848: 3, spp_version=@0x7fffffffa844: Snmp_pp::version3, from_address=…) at mp_v3.cpp:1010
#1 0x00005555556705c1 in Snmp_pp::SnmpMessage::unload (this=this@entry=0x7fffffffab20, pdu=…, community=…, version=@0x7fffffffa844: Snmp_pp::version3, engine_id=engine_id@entry=0x7fffffffa890,
security_name=security_name@entry=0x7fffffffa8d0, security_model=0x7fffffffa848, from_addr=0x7fffffffaa10, snmp_session=0x7fffffffd650) at snmpmsg.cpp:562
#2 0x000055555567239b in Snmp_pp::SnmpMessage::unloadv3 (this=this@entry=0x7fffffffab20, pdu=…, version=@0x7fffffffa844: Snmp_pp::version3, engine_id=…, security_name=…,
security_model=@0x7fffffffa848: 3, from_addr=…, snmp_session=…) at snmpmsg.cpp:202
#3 0x00005555556196f1 in Agentpp::Snmpx::receive (this=0x7fffffffd650, tvptr=tvptr@entry=0x555555729cf0, pdu=…, target=…) at snmp_pp_ext.cpp:775
#4 0x000055555560a606 in Agentpp::RequestList::receive (this=0x7fffffffd590, sec=) at request.cpp:1185
#5 0x00005555555e018e in main ()
(gdb)