Bug 80495 - snmptrap segfaults when invalid type is specified
snmptrap segfaults when invalid type is specified
Product: Red Hat Linux
Classification: Retired
Component: net-snmp (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Phil Knirsch
Depends On:
  Show dependency treegraph
Reported: 2002-12-27 01:21 EST by Oliver Bassett
Modified: 2015-03-04 20:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-02-05 12:47:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Oliver Bassett 2002-12-27 01:21:01 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

Description of problem:
If you specify anything other than the correct type (as listed in man page) 
when you run snmptrap using any trap version. I am running net-snmp-5.0.1-6.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. snmptrap -v 1 -c public host '' 1 0 '' z blah

Actual Results:  Segementation Fault

Expected Results:  A message indicating Invalid Type Specefied

Additional info:

backtrace on core:
(gdb) bt
#0  0x42070a04 in _IO_str_overflow_internal () from /lib/i686/libc.so.6
#1  0x4206fc4a in __overflow () from /lib/i686/libc.so.6
#2  0x42049ff0 in vfprintf () from /lib/i686/libc.so.6
#3  0x42064e1c in vsprintf () from /lib/i686/libc.so.6
#4  0x4205243d in sprintf () from /lib/i686/libc.so.6
#5  0x40050397 in snmp_add_var () from /usr/lib/libnetsnmp.so.5
#6  0x0804919e in main ()
#7  0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
Comment 1 Oliver Bassett 2003-01-22 21:15:08 EST
This issue was fixed in Revision 5.15 in the Net-SNMP CVS.

Revision 5.15 </cgi-bin/viewcvs.cgi/*checkout*/net-snmp/net-
snmp/snmplib/snmp_api.c?rev=5.15> / (view) <snmp_api.c?rev=5.15&content-
type=text/vnd.viewcvs-markup> - annotate <snmp_api.c?annotate=5.15> - [select 
for diffs] <snmp_api.c?r1=5.15> , Mon Sep 9 13:28:40 2002 UTC (4 months, 1 week 
ago) by jbpn 
Branch: MAIN <snmp_api.c?only_with_tag=MAIN> 
Changes since 5.14: +7 -4 lines 
Diff to previous 5.14 <snmp_api.c.diff?r1=5.14&r2=5.15> 
  - fix bug pointed out by Jared Smith-Mickelson (bug #605147)
    whereby passing an unknown type character to snmp_add_var would
    cause a segfault.
Comment 2 Phil Knirsch 2003-02-05 12:47:40 EST
Seems to be fixed in the latest rawhide release.

I've run the snmptrap command and snmpd didn't segfault.

Read ya, Phil

Note You need to log in before you can comment on or make changes to this bug.