[ nagiosplug-Bugs-3535511 ] check_snmp memory corruption with many OIDs/labels/units

SourceForge.net <[email protected]>
Newsgroups gmane.network.nagios.plugins.devel
Message-ID <[email protected]>
Bugs item #3535511, was opened at 2012-06-15 09:10
Message generated for change (Settings changed) made by hweiss
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535511&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Argument proccessing
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Mike Donovan (sburlappp)
>Assigned to: Holger Weiss (hweiss)
Summary: check_snmp memory corruption with many OIDs/labels/units

Initial Comment:
I'm trying to read five OIDs with units and labels with check_snmp v1.4.15 (from current EPEL6 RPMs), and getting misformatted output. (Four OIDs work fine.)


Sample output (from an APC NetBotz):

[root@netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public  -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -l 'temp0' -u 'Cx10'  -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -l 'humid0' -u '%x10'  -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -l 'dewpoint0' -u 'Cx10'  -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -l 'motion' -u ''  -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'airflow' -u 'm/minx10'

\è OK - temp0 223 airflow humid0 450 %x10 dewpoint0 97 Cx10 motion 0  airflow 305 m/minx10 | temp0=223 humid0=450 dewpoint0=97 motion=0 airflow=305

(Note: Initial "SNMP" text was corrupted, and first units shows "airflow" instead of "Cx10".)


[root@netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public  -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -l 'temp0' -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -l 'humid0' -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -l 'dewpoint0' -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -l 'motion' -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'airflow'

SNMP OK - temp0 220 humid0 450 dewpoint0 95 motion 0 airflow 305 | temp0=220 humid0=450 dewpoint0=95 motion=0 airflow=305

(Note: No units, all looks OK.)


[root@netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public  -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -l 'temp0' -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -l 'humid0' -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -l 'dewpoint0' -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -l 'motion' -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'airflow' -u 'Cx10,%x10,Cx10,,m/minx10'

SNMP OK - temp0 217 Cx10 humid0 420 %x10 dewpoint0 82 Cx10 motion 0  Cx10 305 | temp0=217 humid0=420 dewpoint0=82 motion=0 Cx10=305

(Note: Units gathered together, label for "airflow" gets changed to "Cx10".)


[root@netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public  -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'temp0,humid0,dewpoint0,motion,airflow' -u 'Cx10,%x10,Cx10,,m/minx10'

SNMP OK - Cx10 213 Cx10 420 %x10 78 Cx10 0  305 | Cx10=213 iso.3.6.1.4.1.5528.100.4.1.2.1.2.509758980=420 iso.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259=78 iso.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337=0 iso.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735=305

(Note: Gathered labels and units together, now OIDs show up in odd places.)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535511&group_id=29880

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________________
Nagios Plugin Development Mailing List [email protected]
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
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.