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

snmpusm.c: Runtime Error: read_config_save_objid passed NULL user->cloneFrom #730

Closed
moshekaplan opened this issue Oct 12, 2023 · 1 comment

Comments

@moshekaplan
Copy link
Contributor

$ sudo libtool --mode=execute gdb ./agent/snmpd
<snip>

(gdb) break snmpusm.c:4210
Breakpoint 1 at 0x7ffff5e7555d: file snmpusm.c, line 4210.
(gdb) r -M mibs/ -fd -LO6 -C  -c /etc/snmp/snmpd.conf  -c /var/lib/snmp/snmpd.conf -I -smux,mteTrigger,mteTriggerConf

<snip>
/var/lib/snmp/snmpd.conf: line 49: Warning: Unknown token: ifXTable.
/var/lib/snmp/snmpd.conf: line 50: Warning: Unknown token: ifXTable.
Error: passphrase chosen is below the length requirements of the USM (min=8).
/var/lib/snmp/snmpd.conf: line 56: Error: could not generate the authentication key from the supplied pass phrase.
Warning: no access control information configured.
  (Config search path: /usr/local/etc/snmp:/usr/local/share/snmp:/usr/local/lib/snmp:/root/.snmp)
  It's unlikely this agent can serve any useful purpose in this state.
  Run "snmpconf -g basic_setup" to help you configure the snmpd.conf file for this agent.

Breakpoint 1, usm_save_user (user=0x6110000138c0, token=0x7ffff5f26840 "usmUser", type=0x6020000007f0 "snmpd") at snmpusm.c:4210
4210	        read_config_save_objid(cptr, user->cloneFrom, user->cloneFromLen);
(gdb) bt
#0  usm_save_user (user=0x6110000138c0, token=0x7ffff5f26840 "usmUser", type=0x6020000007f0 "snmpd") at snmpusm.c:4210
#1  0x00007ffff5e7613d in usm_save_users_from_list (puserList=0x6110000138c0, token=0x7ffff5f26840 "usmUser", type=0x6020000007f0 "snmpd") at snmpusm.c:4239
#2  0x00007ffff5e76201 in usm_save_users (token=0x7ffff5f26840 "usmUser", type=0x6020000007f0 "snmpd") at snmpusm.c:4249
#3  0x00007ffff5e76256 in usm_store_users (majorID=0, minorID=1, serverarg=0x0, clientarg=0x0) at snmpusm.c:4271
#4  0x00007ffff5de486d in snmp_call_callbacks (major=0, minor=1, caller_arg=0x0) at callback.c:360
#5  0x00007ffff5d1a968 in snmp_store (type=0x555555563020 "snmpd") at snmp_api.c:961
#6  0x0000555555560876 in main (argc=12, argv=0x7fffffffe398) at snmpd.c:1042
(gdb) x/s line
0x7ffff273e020:	"usmUser 1 3 0x80001f88806ac4543dc22afd6400000000 \"testsnmpuser\" \"testsnmpuser\" NULL"

Based on above, the line that appears to be problematic is:
"usmUser 1 3 0x80001f88806ac4543dc22afd6400000000 "testsnmpuser" "testsnmpuser" NULL"

@moshekaplan
Copy link
Contributor Author

Seems to have been fixed by #735 , closing.

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

1 participant