Red Hat Bugzilla – Bug 169554
seg fault if /etc/inittab can't be opened
Last modified: 2014-03-16 22:56:17 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):
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.
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?
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.