Bug 727130
| Summary: | SELinux is preventing /sbin/grubby "search" access to /boot/efi | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Yury V. Zaytsev <yury> |
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
| Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.1 | CC: | dwalsh, mmalik |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | selinux-policy-3.7.19-106.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-12-06 10:10:08 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: | |||
Fixed in selinux-policy-3.7.19-106.el6 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1511.html |
Description of problem: I am getting the following denials in my logs: Jul 25 19:21:08 XXX setroubleshoot: SELinux is preventing /usr/bin/python "search" access to /boot/efi. For complete SELinux messages. run sealert -l b6a006e4-78c7-43c3-8209-6ad6abec057b Jul 25 19:21:08 XXX setroubleshoot: SELinux is preventing /sbin/grubby "search" access to /boot/efi. For complete SELinux messages. run sealert -l b6a006e4-78c7-43c3-8209-6ad6abec057b Jul 25 19:21:08 XXX setroubleshoot: SELinux is preventing /sbin/grubby "search" access to /boot/efi. For complete SELinux messages. run sealert -l b6a006e4-78c7-43c3-8209-6ad6abec057b Jul 25 19:21:08 XXX setroubleshoot: SELinux is preventing /sbin/grubby "search" access to /boot/efi. For complete SELinux messages. run sealert -l b6a006e4-78c7-43c3-8209-6ad6abec057b I'm not 100% confident of what I was doing at that time, but I think I've been installing a kernel update. This system is an x86_64 machine which can, however, only boot via EFI, hence I do indeed have an EFI boot partition. audit2allow generates the following module: module grubby 1.0; require { type dosfs_t; type kdumpgui_t; class dir search; } #============= kdumpgui_t ============== allow kdumpgui_t dosfs_t:dir search; Looks like the hole it's trying to punch is too big, but I leave it here for your consideration. Version-Release number of selected component (if applicable): # rpm -q selinux-policy grubby kernel selinux-policy-3.7.19-93.el6_1.2.noarch grubby-7.0.15-2.el6.x86_64 kernel-2.6.32-131.2.1.el6.x86_64 kernel-2.6.32-131.4.1.el6.x86_64 kernel-2.6.32-131.6.1.el6.x86_64 Additional info: SELinux is preventing /sbin/grubby "search" access to /boot/efi. Detailed Description: SELinux denied access requested by grubby. /boot/efi may be a mislabeled. /boot/efi default SELinux type is boot_t, but its current type is dosfs_t. Changing this file back to the default type, may fix your problem. File contexts can be assigned to a file in the following ways. * Files created in a directory receive the file context of the parent directory by default. * The SELinux policy might override the default label inherited from the parent directory by specifying a process running in context A which creates a file in a directory labeled B will instead create the file with label C. An example of this would be the dhcp client running with the dhclient_t type and creating a file in the directory /etc. This file would normally receive the etc_t type due to parental inheritance but instead the file is labeled with the net_conf_t type because the SELinux policy specifies this. * Users can change the file context on a file using tools such as chcon, or restorecon. This file could have been mislabeled either by user error, or if an normally confined application was run under the wrong domain. However, this might also indicate a bug in SELinux because the file should not have been labeled with this type. If you believe this is a bug, please file a bug report against this package. Allowing Access: You can restore the default system context to this file by executing the restorecon command. restorecon '/boot/efi', if this file is a directory, you can recursively restore using restorecon -R '/boot/efi'. Fix Command: /sbin/restorecon '/boot/efi' Additional Information: Source Context system_u:system_r:kdumpgui_t:s0-s0:c0.c1023 Target Context system_u:object_r:dosfs_t:s0 Target Objects /boot/efi [ dir ] Source system-config-k Source Path /usr/bin/python Port <Unknown> Host XXX Source RPM Packages grubby-7.0.15-2.el6 Target RPM Packages Policy RPM selinux-policy-3.7.19-93.el6_1.2 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name restorecon Host Name XXX Platform Linux XXX 2.6.32-131.6.1.el6.x86_64 #1 SMP Mon Jun 20 14:15:38 EDT 2011 x86_64 x86_64 Alert Count 4 First Seen Mon Jul 25 19:21:06 2011 Last Seen Mon Jul 25 19:21:06 2011 Local ID b6a006e4-78c7-43c3-8209-6ad6abec057b Line Numbers Raw Audit Messages node=XXX type=AVC msg=audit(1311614466.735:235): avc: denied { search } for pid=7849 comm="grubby" name="/" dev=sdb1 ino=1 scontext=system_u:system_r:kdumpgui_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dosfs_t:s0 tclass=dir node=XXX type=SYSCALL msg=audit(1311614466.735:235): arch=c000003e syscall=2 success=no exit=-13 a0=408629 a1=0 a2=c74440 a3=7fff3daf79d0 items=0 ppid=7774 pid=7849 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="grubby" exe="/sbin/grubby" subj=system_u:system_r:kdumpgui_t:s0-s0:c0.c1023 key=(null)