Bug 55840 - daemon seg fault when using the disk directive
daemon seg fault when using the disk directive
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: ucd-snmp (Show other bugs)
7.1
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Phil Knirsch
Brock Organ
:
: 55538 57464 58959 60683 61977 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-07 11:29 EST by Need Real Name
Modified: 2015-03-04 20:09 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-05 12:29:27 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 Need Real Name 2001-11-07 11:29:10 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011023

Description of problem:
I upgraded ucd-snmp to 4.2.1-4.7.x from 4.2-12 and it now segfaults if the
"disk" directive is uncommented from the configuration file.

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


How reproducible:
Always

Steps to Reproduce:
1.uncomment disk directive in /etc/snmp/snmpd.conf
2.startup snmpd from command line without forking to see output (snmpd -P
/var/run/snmpd -s -a -D -f)

Actual Results:  segmentation fault while Parsing: disk / 10000

Additional info:
Comment 1 Phil Knirsch 2001-11-12 06:25:51 EST
*** Bug 55538 has been marked as a duplicate of this bug. ***
Comment 2 Timothy Burt 2001-11-12 13:46:22 EST
RH 7.0 does it too.

My original config had a disk directive in it, and when the RPM was installed 
automatically last night, it brought down snmpd.

Thanks for posting this bug report.  At least I knew what to do to get SNMP 
back up on it's feet.
Comment 3 John Morrissey 2002-01-25 16:22:23 EST
This is a problem with the machine on which the new ucd-snmp RPMs were build.
From that version's configure.in:

AC_CACHE_CHECK(for mount table location,ac_cv_ETC_MNTTAB,
[ac_cv_ETC_MNTTAB="unknown"
for i in /etc/mnttab /etc/mtab
  do
  if test -f $i; then
    ac_cv_ETC_MNTTAB="$i" 
    break;  
  fi
done
])  

If /etc/mtab or /etc/mnttab aren't present on the build host, it defaults to
unknown. When you
add a disk directive to snmpd.conf, ucd-snmp calls setmntent() on this file,
which returns NULL (ENOENT). ucd-snmp doesn't check the return value of
setmntent() (this should be kicked upstream) and passes it blindly to
getmntent(), which segfaults on the NULL handle.

Fix: re-build the SRPM on a machine with an /etc/mtab. The rawhide and/or RH 7.2
RPM might have been built on a machine with an /etc/mtab, so those RPMs might
also work.

58131 and 57464 are duplicates of this bug.
Comment 4 Phil Knirsch 2002-01-29 09:53:39 EST
The latest version (4.2.3) is available via rawhide now. This should fix this
problem.

Thanks,

Read ya, Phil
Comment 5 Void Main 2002-02-13 02:04:00 EST
Looks like this bug is back with the RHSA-2001-163 release of 
ucd-snmp-4.2.3-1.x.x.3.i386.rpm.  I've tried the 6.x, 7.1, and 7.2 releases of the RPM. 
With "disk / 10000" uncommented snmpd will not start.  With it commented, snmpd 
runs fine.
Comment 6 Phil Knirsch 2002-03-07 10:20:01 EST
*** Bug 57464 has been marked as a duplicate of this bug. ***
Comment 7 Phil Knirsch 2002-03-07 10:20:30 EST
*** Bug 60683 has been marked as a duplicate of this bug. ***
Comment 8 Phil Knirsch 2002-03-07 10:22:26 EST
OK, i've reopened the 'original' disk bug and will fix in somehow for the next
release.

Read ya, Phil
Comment 9 Phil Knirsch 2002-03-07 10:23:16 EST
*** Bug 58959 has been marked as a duplicate of this bug. ***
Comment 10 Phil Knirsch 2002-03-26 10:22:34 EST
*** Bug 61977 has been marked as a duplicate of this bug. ***
Comment 11 Phil Knirsch 2002-04-05 12:29:22 EST
*** Bug 58131 has been marked as a duplicate of this bug. ***
Comment 12 Phil Knirsch 2002-04-09 08:05:15 EDT
The latest ucd-snmp package now has a final fix for this. It is using /etc/mtab
hardcoded as the ETC_MNTTAB file.

Verified with Skipjack beta and the latest build.

The package ucd-snmp-4.2.4.pre3-4 should appear soon via rawhide.

Hopefully closing this bug once and for all. :-)

Read ya, Phil

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