Bug 133373 - /proc/modules is allowed to be inherited by child processes
/proc/modules is allowed to be inherited by child processes
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kudzu (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks: FC3Target FC3SELinux
  Show dependency treegraph
 
Reported: 2004-09-23 12:09 EDT by Russell Coker
Modified: 2014-03-16 22:48 EDT (History)
2 users (show)

See Also:
Fixed In Version: 1.1.91-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-30 01:06:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix FILE leak in kudzu (995 bytes, patch)
2004-09-29 20:30 EDT, Miloslav Trmač
no flags Details | Diff

  None (edit)
Description Russell Coker 2004-09-23 12:09:04 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko)

Description of problem:
As can be seen in the below messages a file handle for /proc/modules is inherited by child processes of firstboot (in this case ntpdate).  The file handle should either be closed before process execution or should be marked close-on-exec.

audit(1095950199.466:0): avc:  denied  { use } for  pid=2841 exe=/usr/sbin/ntpdate path=/proc/modules dev=proc ino=-268435437 scontext=system_u:system_r:ntpd_ttcontext=system_u:system_r:firstboot_t tclass=fd
audit(1095950199.488:0): avc:  denied  { use } for  pid=2841 exe=/usr/sbin/ntpdate path=/proc/modules dev=proc ino=-268435437 scontext=system_u:system_r:ntpd_ttcontext=system_u:system_r:firstboot_t tclass=fd


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

How reproducible:
Always

Steps to Reproduce:
boot with SE Linux strict policy and observe the avc messages.

Additional info:
Comment 1 Miloslav Trmač 2004-09-29 20:30:41 EDT
Created attachment 104556 [details]
Fix FILE leak in kudzu

Seems to be caused by a FILE leak in kudzu.
Comment 2 Russell Coker 2004-09-29 21:52:43 EDT
The file handle is labeled with domain firstboot_t.  This means that 
a program running in the firstboot_t domain opened the file handle.  
kudzu runs in domain kudzu_t. 
 
Unless firstboot links in code from kudzu.c I don't think that the 
patch will entirely fix the problem.  That's OK, it'll probably fix 
other problems so it's worth doing. 
Comment 3 Miloslav Trmač 2004-09-29 22:00:24 EDT
The whole chain (I think) is:
firstboot
/usr/share/firstboot/modules/soundcard_gui.py
system-config-soundcard
/usr/lib/python2.3/site-packages/kudzu.py
/usr/lib/python2.3/site-packages/_kudzumodule.so
... which indeed shares code with kudzu.
Comment 4 Bill Nottingham 2004-09-29 23:20:04 EDT
Fixed in CVS, will be in 1.1.89-1.
Comment 5 Bill Nottingham 2004-09-30 01:06:36 EDT
Erm, make that 1.1.91-1.

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