Bug 55840 - daemon seg fault when using the disk directive
Summary: daemon seg fault when using the disk directive
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ucd-snmp   
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
medium
high
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
: 55538 57464 58959 60683 61977 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-07 16:29 UTC by Need Real Name
Modified: 2015-03-05 01:09 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-05 17:29:27 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2002:106 normal SHIPPED_LIVE Updated ucd-snmp packages available 2002-06-04 04:00:00 UTC

Description Need Real Name 2001-11-07 16:29:10 UTC
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 11:25:51 UTC
*** Bug 55538 has been marked as a duplicate of this bug. ***

Comment 2 Timothy Burt 2001-11-12 18:46:22 UTC
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 21:22:23 UTC
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 14:53:39 UTC
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 07:04:00 UTC
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 15:20:01 UTC
*** Bug 57464 has been marked as a duplicate of this bug. ***

Comment 7 Phil Knirsch 2002-03-07 15:20:30 UTC
*** Bug 60683 has been marked as a duplicate of this bug. ***

Comment 8 Phil Knirsch 2002-03-07 15:22:26 UTC
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 15:23:16 UTC
*** Bug 58959 has been marked as a duplicate of this bug. ***

Comment 10 Phil Knirsch 2002-03-26 15:22:34 UTC
*** Bug 61977 has been marked as a duplicate of this bug. ***

Comment 11 Phil Knirsch 2002-04-05 17:29:22 UTC
*** Bug 58131 has been marked as a duplicate of this bug. ***

Comment 12 Phil Knirsch 2002-04-09 12:05:15 UTC
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.