Bug 1022288 - SELinux is preventing /usr/bin/dmesg from 'write' accesses on the file /proc/sys/kernel/printk.
SELinux is preventing /usr/bin/dmesg from 'write' accesses on the file /proc/...
Status: CLOSED DUPLICATE of bug 986647
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-22 21:03 EDT by Thynson
Modified: 2013-10-24 10:08 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-24 10:08:40 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 Thynson 2013-10-22 21:03:14 EDT
Description of problem:
SELinux is preventing /usr/bin/dmesg from 'write' accesses on the file /proc/sys/kernel/printk.

*****  Plugin leaks (86.2 confidence) suggests   *****************************

If 您想要忽略 dmesg 尝试 write 访问 printk file,因为您确定它不应需要这个访问。
Then 您应该将这个问题作为 bug 报告。 
# grep /usr/bin/dmesg /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

*****  Plugin catchall (14.7 confidence) suggests   **************************

If 您确定应默认允许 dmesg write 访问 printk file。
Then 您应该将这个情况作为 bug 报告。
# grep dmesg /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:dmesg_t:s0
Target Context                system_u:object_r:sysctl_kernel_t:s0
Target Objects                /proc/sys/kernel/printk [ file ]
Source                        dmesg
Source Path                   /usr/bin/dmesg
Port                          <未知>
Host                          (removed)
Source RPM Packages           util-linux-2.24-0.1.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-90.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.6-300.fc20.x86_64 #1 SMP Fri
                              Oct 18 22:31:53 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-10-20 00:56:52 CST
Last Seen                     2013-10-23 09:01:40 CST
Local ID                      5504ddf3-3a23-41d4-978f-1726f771bc0b

Raw Audit Messages
type=AVC msg=audit(1382490100.928:521): avc:  denied  { write } for  pid=4242 comm="dmesg" path="/proc/sys/kernel/printk" dev="proc" ino=27086 scontext=system_u:system_r:dmesg_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=file

type=SYSCALL msg=audit(1382490100.928:521): arch=x86_64 syscall=execve success=yes exit=0 a0=22adc20 a1=22acc60 a2=22acb00 a3=8 items=0 ppid=4240 pid=4242 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=dmesg exe=/usr/bin/dmesg subj=system_u:system_r:dmesg_t:s0 key=(null)

Hash: dmesg,dmesg_t,sysctl_kernel_t,file,write

Additional info:
reporter:       libreport-2.1.8
hashmarkername: setroubleshoot
kernel:         3.11.6-300.fc20.x86_64
type:           libreport

Potential duplicate: bug 986647
Comment 1 Miroslav Grepl 2013-10-24 10:08:40 EDT

*** This bug has been marked as a duplicate of bug 986647 ***

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