Bug 448579 - brctl needs access to /dev/console?
Summary: brctl needs access to /dev/console?
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-27 17:53 UTC by James Ralston
Modified: 2008-11-17 22:04 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-17 22:04:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Ralston 2008-05-27 17:53:11 UTC
Here's the simplest way to explain the problem:

May 27 10:58:57 hostname kernel: type=1400 audit(1211900331.181:3): avc:  denied
 { read write } for  pid=1957 comm="brctl" path="/dev/console" dev=tmpfs ino=230
scontext=system_u:system_r:brctl_t:s0
tcontext=system_u:object_r:console_device_t:s0 tclass=chr_file

This occurs when networking comes up (e.g., at system startup).  I suspect it
happens because my primary network interface, eth0, is actually a bridge; my
/etc/sysconfig/network-scripts configuration files for br0/eth0 are:

    DEVICE=br0
    TYPE=Bridge
    ONBOOT=yes
    [...]

    DEVICE=eth0
    TYPE=Ethernet
    ONBOOT=yes
    BRIDGE=br0

Now, I can work around this problem by loading a custom module that contains:

allow brctl_t console_device_t:chr_file { read write };

But I'm thinking that since bridging the network interface is necessary for
creating a KVM guest that uses shared physical networking, this policy update
should really go into the targeted policy.

(Alternatively, one might be able to argue that it's a bug that brctl wants to
read/write /dev/console.  But I'm not familiar enough with brctl to make that
assertion.)

Comment 1 Daniel Walsh 2008-05-27 20:05:21 UTC
You can allow this for now by executing 

# audit2allow -M mypol -i /var/log/audit/audit.log 
# semodule -i mypol.pp

Fixed in selinux-policy-3.3.1-56.fc9


Comment 2 Daniel Walsh 2008-11-17 22:04:18 UTC
Closing all bugs that have been in modified for over a month.  Please reopen if the bug is not actually fixed.


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