Bug 469670 - snmpd: argument parsing causes segfaults
snmpd: argument parsing causes segfaults
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: net-snmp (Show other bugs)
5.3
All Linux
low Severity low
: rc
: ---
Assigned To: Jan Safranek
BaseOS QE
:
Depends On: 469620
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-03 07:41 EST by Jan Safranek
Modified: 2008-11-03 07:50 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-11-03 07:50:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Safranek 2008-11-03 07:41:55 EST
+++ 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 07:50:20 EST
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.