Bug 567004 - SELinux is preventing /usr/bin/qemu-kvm "setattr" access on 4.
Summary: SELinux is preventing /usr/bin/qemu-kvm "setattr" access on 4.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:2614f3b50f9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-21 02:21 UTC by Casey Dahlin
Modified: 2014-06-18 08:47 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.6.32-92.fc12
Clone Of:
Environment:
Last Closed: 2010-03-04 00:17:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Casey Dahlin 2010-02-21 02:21:17 UTC
Summary:

SELinux is preventing /usr/bin/qemu-kvm "setattr" access on 4.

Detailed Description:

[qemu-kvm has a permissive type (svirt_t). This access was not denied.]

SELinux denied access requested by qemu-kvm. It is not expected that this access
is required by qemu-kvm and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:svirt_t:s0:c325,c846
Target Context                system_u:object_r:devpts_t:s0:c325,c846
Target Objects                4 [ chr_file ]
Source                        qemu-kvm
Source Path                   /usr/bin/qemu-kvm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-0.11.0-13.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-89.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.12-174.2.22.fc12.x86_64 #1
                              SMP Fri Feb 19 18:55:03 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Sat 20 Feb 2010 09:20:05 PM EST
Last Seen                     Sat 20 Feb 2010 09:20:05 PM EST
Local ID                      04a8efb0-8c21-4166-92e4-8011fe55e0cb
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1266718805.216:45068): avc:  denied  { setattr } for  pid=8118 comm="qemu-kvm" name="4" dev=devpts ino=7 scontext=system_u:system_r:svirt_t:s0:c325,c846 tcontext=system_u:object_r:devpts_t:s0:c325,c846 tclass=chr_file

node=(removed) type=SYSCALL msg=audit(1266718805.216:45068): arch=c000003e syscall=92 success=yes exit=128 a0=7fff854129b0 a1=6b a2=5 a3=7fff85412270 items=0 ppid=1 pid=8118 auid=4294967295 uid=107 gid=107 euid=107 suid=107 fsuid=107 egid=107 sgid=107 fsgid=107 tty=(none) ses=4294967295 comm="qemu-kvm" exe="/usr/bin/qemu-kvm" subj=system_u:system_r:svirt_t:s0:c325,c846 key=(null)



Hash String generated from  catchall,qemu-kvm,svirt_t,devpts_t,chr_file,setattr
audit2allow suggests:

#============= svirt_t ==============
allow svirt_t devpts_t:chr_file setattr;

Comment 1 Daniel Walsh 2010-02-22 20:08:46 UTC
Miroslav, 

We need to add

	type $1_devpts_t;
	term_pty($1_devpts_t)

	allow $1_t $1_devpts_t:chr_file { rw_chr_file_perms setattr };
	term_create_pty($1_t, $1_devpts_t)

to virt_domain_template

Which should then change the label to svirt_devpts_t and allow this access.

Comment 2 Miroslav Grepl 2010-02-23 09:26:27 UTC
Fixed in selinux-policy-3.6.32-92.fc12

Comment 3 Fedora Update System 2010-02-23 20:58:00 UTC
selinux-policy-3.6.32-92.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-92.fc12

Comment 4 Fedora Update System 2010-02-26 03:44:51 UTC
selinux-policy-3.6.32-92.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-2953

Comment 5 Fedora Update System 2010-03-04 00:13:29 UTC
selinux-policy-3.6.32-92.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Tim Waugh 2010-03-04 10:23:24 UTC
I'm seeing this on F-13 with selinux-policy-3.7.10-4.fc13.noarch.

Comment 7 Daniel Walsh 2010-03-04 13:15:50 UTC
Fixed in selinux-policy-3.7.11-1.fc13


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