Menu

#1383 EngineID corrupts after restarts of snmpd

linux
closed
nobody
agent (1105)
3
2012-11-08
2005-06-16
No

When using snmpd built from net-snmp 5.2.1 source, I
have discovered a most annoying problem that breaks
SNMPv3 support.

It goes as follows:

When snmpd shuts down, it writes the EngineID and the
number of reboots in a file - on my Debian Sarge based
system, what we have after 7 shutdown/restart is:

tethys:/home/tedfrje# more /var/lib/snmp/snmpapp.conf
engineBoots 1
oldEngineID 0x80001f888026178162ef78a542
engineBoots 1
oldEngineID 0x80001f888026178162ef78a542
engineBoots 2
oldEngineID 0x80001f888026178162ef78a5
engineBoots 2
oldEngineID 0x80001f888026178162ef78a5
engineBoots 3
oldEngineID 0x80001f888026178162ef
engineBoots 3
oldEngineID 0x80001f888026178162ef
engineBoots 4
oldEngineID 0x80001f8880261781
tethys:/home/tedfrje#

tethys:/home/tedfrje# net-snmp-config --configure-options
'--prefix=/usr' '--sysconfdir=/etc' '--mandir=/usr/share/man'
'--with-persistent-directory=/var/lib/snmp'
'--enable-ucd-snmp-compatibility'
'--with-perl-modules=INSTALLDIRS=vendor' '--enable-mfd-
rewrites'
'--enable-ipv6' '--with-transports=UDPIPv6 TCPIPv6'
'--with-sys-contact=b2ncw' '--with-sys-location=b2ncw
demo network'
'--with-default-snmp-version=3' '--with-logfile=none' '--
without-rpm'
'--with-libwrap' '--with-openssl' '--without-dmalloc' '--without-
efence'
'--without-rsaref' '--enable-shared' '--with-cflags=-O2 -
D_REENTRANT'
'--with-mib-modules=host ucd-snmp/dlmod ucd-snmp/diskio
disman/event-mib
disman/expression-mib misc/ipfwacc tunnel agentx ucd-
snmp/lmSensors'
tethys:/home/tedfrje#

The effect is that SNMPv3 users will not
authenticate "unknown user" is returned in response to
queries - and no AuthenticationError Informs - any Informs
in fact - are received by the Manager.

After more than seven restarts, the agent segfaults.

Discussion

  • Robert Story

    Robert Story - 2005-06-17

    Logged In: YES
    user_id=76148

    can you retry this with a stock net-snmp build? The agent
    should not be writing to a file called snmpapp.conf, so I
    suspect this is a debian bug.

     
  • Thomas Anders

    Thomas Anders - 2005-07-23

    Logged In: YES
    user_id=848638

    Not a debian bug, AFAICS. I rather suspect local modification.

    Closed due to lack of response.

     

Log in to post a comment.