Bug 623466
| Summary: | SELinux is preventing /usr/sbin/nscd access to a leaked /dev/null file descriptor. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Steve Tyler <stephent98> |
| Component: | rpm | Assignee: | Panu Matilainen <pmatilai> |
| Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 13 | CC: | dwalsh, ffesti, james.antill, jnovy, maxamillion, mgrepl, pmatilai, tim.lauridsen |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | setroubleshoot_trace_hash:e33baeffd2a480299328edeceb3a17eec6a7a22bd819a7c6bba401300fb83c10 | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-06-28 14:42:18 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Steve Tyler
2010-08-11 20:26:54 UTC
AFAICT, the first occurrence was during a massive update on Aug 7, 2010. Snippet from /var/log/messages-20100808: Aug 7 14:56:25 maple yum[4236]: Installed: bzip2-1.0.5-6.fc12.i686 Aug 7 14:56:26 maple yum[4236]: Installed: pcre-7.8-3.fc12.i686 Aug 7 14:56:27 maple setroubleshoot: SELinux is preventing /usr/sbin/groupadd access to a leaked /dev/null file descriptor. For complete SELinux messages. run sealert -l 351f77ca-8fef-4d62-a53d-aed11492d410 Aug 7 14:56:29 maple yum[4236]: Installed: grep-2.6.3-1.fc13.i686 Aug 7 14:56:33 maple yum[4236]: Installed: lua-5.1.4-4.fc12.i686 The context is now: $ ls -Z /dev/null crw-rw-rw-. root root system_u:object_r:null_device_t:s0 /dev/null NB: This system was a clean F13 net install using all default settings for a Gnome desktop configuration on a laptop. I can attach logs if needed. Whoops! Those log messages say "Installed", not "Updated". I now remember doing an non-standard yum install to another partition in an experiment to try installing without anaconda. # history | grep groupinstall 147 yum groupinstall Base --installroot=`pwd` --releasever=13 The other partition was previously formatted and mounted. Something was wrong (maybe udev problem) and /dev/null was mislabeled. Now it has right context and it will work. (In reply to comment #3) > Something was wrong (maybe udev problem) and /dev/null was mislabeled. Now it > has right context and it will work. I easily reproduced this bug as suggested in comment 2. mkdir fake_root cd fake_root sudo yum groupinstall Base --installroot=`pwd` --releasever=13 The mislabelling is in fake_root/dev: [stephent@walnut fake_root]$ ls -Z dev -rw-r--r--. root root unconfined_u:object_r:device_t:s0 null -rw-r--r--. root root unconfined_u:object_r:device_t:s0 stderr [stephent@walnut fake_root]$ ls -l dev total 4 -rw-r--r--. 1 root root 0 Aug 12 09:43 null -rw-r--r--. 1 root root 45 Aug 12 09:43 stderr [stephent@walnut fake_root]$ Snippet from /var/log/messages: Aug 12 09:38:35 localhost yum[6293]: Installed: libacl-2.2.49-6.fc13.x86_64 Aug 12 09:38:36 localhost yum[6293]: Installed: 2:shadow-utils-4.1.4.2-8.fc13.x86_64 Aug 12 09:38:36 localhost kernel: type=1400 audit(1281631116.450:29492): avc: denied { write } for pid=6507 comm="groupadd" path="/dev/null" dev=dm-4 ino=4073123 scontext=unconfined_u:system_r:groupadd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:device_t:s0 tclass=file Aug 12 09:38:37 localhost yum[6293]: Installed: 1:dbus-1.2.24-1.fc13.x86_64 Aug 12 09:38:37 localhost yum[6293]: Installed: 1:findutils-4.4.2-8.fc13.x86_64 I guess I would say this is a yum/rpm error. Although I am not sure how I would fix this. Rpm needs to be faked out that the chroot path is eliminated. I may have narrowed this down a bit. It looks like dev/null with the wrong security context is created when device-mapper-libs is installed. Procedure: mkdir fake_root cd fake_root In a new terminal window run: watch -n 1 'ls --lcontext dev 2>&1' Start the install: sudo yum install --installroot=`pwd` --releasever=13 device-mapper-libs When it completes, dev/null exists: $ ls --lcontext dev total 0 -rw-r--r--. 1 unconfined_u:object_r:device_t:s0 root root 0 Aug 13 07:01 null device-mapper-libs-1.02.44-1.fc13.x86_64 Just seems like a very strange context to get created. Wait it is created as a file rather then a device. Maybe rpm and yum are working correctly but post install scripts are causing these files to get created as files. mkdir -p fake_root/dev sudo mount -o bind /dev fake_root/dev cd fake_root sudo yum groupinstall Base --installroot=`pwd` --releasever=13 Should work This might be an example of where we would want yum/rpm to not put down labels, like with mock. (In reply to comment #8) > Maybe rpm and yum are working correctly but post install scripts are causing > these files to get created as files. In the chroot environment during the install, the "filesystem" package creates /dev, but /dev/null does not exist, so the first script that opens /dev/null could end up creating it as a regular file. > Wait it is created as a file rather then a device. They both are regular files: [stephent@walnut fake_root]$ cat dev/stderr The default plymouth plugin () doesn't exist [stephent@walnut fake_root]$ Yes I figured this out. This message is a reminder that Fedora 13 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '13'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 13's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 13 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed. |