Bug 169554 - seg fault if /etc/inittab can't be opened
seg fault if /etc/inittab can't be opened
Product: Fedora
Classification: Fedora
Component: kudzu (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2005-09-29 12:54 EDT by Robert Haas
Modified: 2014-03-16 22:56 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.2.10-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-29 13:32:20 EDT
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 Robert Haas 2005-09-29 12:54:48 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

Description of problem:
The checkInittab() function in hwdata.c calls fopen() on /etc/inittab but does not check whether the operation succeeds.  As a result, if the file does not exist or otherwise can't be opened, fgets() is invoked with a NULL pointer as its third argument, which causes kudzu to die with a segmentation fault.

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

How reproducible:

Steps to Reproduce:
1. Remove (or rename) /etc/inittab.
2. Run kudzu.  

Actual Results:  Kudzu crashes.

Expected Results:  Kudzu prints an error message and then either dies or soldiers on.

Additional info:
Comment 1 Bill Nottingham 2005-09-29 13:32:20 EDT
Fixed in CVS, will be in 1.2.10-1 - thanks!

Out of curiosity, was it failing due to SELinux prohibiting the open, or had you
switched to non-SysV init?
Comment 2 Robert Haas 2005-09-29 22:11:07 EDT
It wasn't SELinux.  I had built a stripped down environment with a very small,
special purpose custom init that doesn't use any configuration files, so
/etc/inittab just didn't exist.

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