Bug 469670 - snmpd: argument parsing causes segfaults
Summary: snmpd: argument parsing causes segfaults
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: net-snmp
Version: 5.3
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jan Safranek
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On: 469620
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-03 12:41 UTC by Jan Safranek
Modified: 2008-11-03 12:50 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-03 12:50:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Safranek 2008-11-03 12:41:55 UTC
+++ This bug was initially created as a clone of Bug #469620 +++

Description of problem:

This has been fixed upstream, please see details at http://sourceforge.net/tracker/index.php?func=detail&aid=1856562&group_id=12694&atid=112694

How reproducible:

Always.

Steps to Reproduce:

- Stop snmpd
- Start it using using any of the below method.

# snmpd -LF
# snmpd -LS

Snmpd shouldn't segfault, instead it should either start snmpd or say "syntax error". These options are deprecated as per "snmpd --help", but it should never segfault at any cost.

Actual results:

Snmpd segfatuls.

Expected results:

It shouldn't, but it should report "invalid syntax" if the passed options does not make any sense to it.

Additional info:

Patch is already upstream and is available from the above link.

--Sadique

Core was generated by `snmpd -f -LS'.
Program terminated with signal 11, Segmentation fault.
#0  decode_priority (optarg=0x0, pri_max=0x7fffda621c50) at snmp_logging.c:174
174         switch (*optarg) {
(gdb) bt
#0  decode_priority (optarg=0x0, pri_max=0x7fffda621c50) at snmp_logging.c:174
#1  0x00002accd12eb169 in snmp_log_options (optarg=<value optimized out>, argc=<value optimized out>, argv=0x7fffda622008) at snmp_logging.c:377
#2  0x00002accd048935d in main (argc=3, argv=0x7fffda622008) at snmpd.c:628

(gdb) thread apply all bt

Thread 1 (process 12849):
#0  decode_priority (optarg=0x0, pri_max=0x7fffda621c50) at snmp_logging.c:174
#1  0x00002accd12eb169 in snmp_log_options (optarg=<value optimized out>, argc=<value optimized out>, argv=0x7fffda622008) at snmp_logging.c:377
#2  0x00002accd048935d in main (argc=3, argv=0x7fffda622008) at snmpd.c:628
This event sent from IssueTracker by jnansi  [Support Engineering Group]
 issue 224872

Comment 1 Jan Safranek 2008-11-03 12:50:20 UTC
oops, this is already fixed in RHEL5.3 update by rebase to net-snmp-5.3.2.2, sorry for confusion.


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