Bug 953147 - SELinux is preventing /usr/sbin/dmidecode from 'read' accesses on the chr_file mem.
Summary: SELinux is preventing /usr/sbin/dmidecode from 'read' accesses on the chr_fil...
Keywords:
Status: CLOSED DUPLICATE of bug 953133
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c0119639c83f5c90e0c45234fe6...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-17 13:09 UTC by Jiří Martínek
Modified: 2013-04-17 22:24 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-17 22:24:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jiří Martínek 2013-04-17 13:09:52 UTC
Description of problem:
pmtd-selinux-test
SELinux is preventing /usr/sbin/dmidecode from 'read' accesses on the chr_file mem.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that dmidecode should be allowed read access on the mem chr_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep dmidecode /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:tuned_t:s0
Target Context                system_u:object_r:memory_device_t:s0
Target Objects                mem [ chr_file ]
Source                        dmidecode
Source Path                   /usr/sbin/dmidecode
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           dmidecode-2.11-10.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-24.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.0-0.rc4.git0.1.fc19.x86_64 #1
                              SMP Mon Mar 25 02:31:02 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-04-17 08:45:10 EDT
Last Seen                     2013-04-17 08:45:10 EDT
Local ID                      9df1c0b1-2418-44c2-9182-6124e379bc2e

Raw Audit Messages
type=AVC msg=audit(1366202710.446:120): avc:  denied  { read } for  pid=2709 comm="dmidecode" name="mem" dev="devtmpfs" ino=1044 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:memory_device_t:s0 tclass=chr_file


type=AVC msg=audit(1366202710.446:120): avc:  denied  { open } for  pid=2709 comm="dmidecode" path="/dev/mem" dev="devtmpfs" ino=1044 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:memory_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1366202710.446:120): arch=x86_64 syscall=open success=yes exit=ESRCH a0=409bd8 a1=0 a2=409bd8 a3=7fff426969d0 items=0 ppid=2708 pid=2709 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=dmidecode exe=/usr/sbin/dmidecode subj=system_u:system_r:tuned_t:s0 key=(null)

Hash: dmidecode,tuned_t,memory_device_t,chr_file,read

audit2allow

#============= tuned_t ==============
allow tuned_t memory_device_t:chr_file { read open };

audit2allow -R
require {
	type tuned_t;
	type memory_device_t;
	class chr_file { read open };
}

#============= tuned_t ==============
allow tuned_t memory_device_t:chr_file { read open };


Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.0-0.rc4.git0.1.fc19.x86_64
type:           libreport

Comment 1 David Kutálek 2013-04-17 16:25:54 UTC
Description of problem:
AVC popped up after running as root:
tuned-adm recommend

Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.0-0.rc4.git0.1.fc19.x86_64
type:           libreport

Comment 2 Daniel Walsh 2013-04-17 22:24:54 UTC

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


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