Bug 732862 - SELinux is preventing /usr/sbin/lldpad from using the 'sys_module' capabilities.
Summary: SELinux is preventing /usr/sbin/lldpad from using the 'sys_module' capabilities.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 16
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard: abrt_hash:8abf41fd77118b4b216e2a653ac...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-24 00:57 UTC by Stephen Lewis
Modified: 2013-02-13 18:48 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-13 18:48:37 UTC


Attachments (Terms of Use)

Description Stephen Lewis 2011-08-24 00:57:31 UTC
abrt version: 2.0.5
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.0.0-1.fc16.x86_64
reason:         SELinux is preventing /usr/sbin/lldpad from using the 'sys_module' capabilities.
time:           Tue Aug 23 17:55:44 2011

description:
:SELinux is preventing /usr/sbin/lldpad from using the 'sys_module' capabilities.
:
:*****  Plugin sys_module (99.5 confidence) suggests  *************************
:
:If you do not believe that /usr/sbin/lldpad should be attempting to modify the kernel by loading a kernel module.
:Then a process might be attempting to hack into your system.
:Do
:contact your security administrator and report this issue.
:
:*****  Plugin catchall (1.49 confidence) suggests  ***************************
:
:If you believe that lldpad should have the sys_module capability 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 lldpad /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:lldpad_t:s0
:Target Context                system_u:system_r:lldpad_t:s0
:Target Objects                Unknown [ capability ]
:Source                        lldpad
:Source Path                   /usr/sbin/lldpad
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           lldpad-0.9.43-1.fc16
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-15.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.0.0-1.fc16.x86_64 #1 SMP Fri Jul
:                              22 16:09:29 UTC 2011 x86_64 x86_64
:Alert Count                   3
:First Seen                    Tue 23 Aug 2011 05:14:06 PM PDT
:Last Seen                     Tue 23 Aug 2011 05:50:04 PM PDT
:Local ID                      15c58b1b-9547-4cbb-8fd6-c62aa1c1c6b2
:
:Raw Audit Messages
:type=AVC msg=audit(1314147004.511:135): avc:  denied  { sys_module } for  pid=1016 comm="lldpad" capability=16  scontext=system_u:system_r:lldpad_t:s0 tcontext=system_u:system_r:lldpad_t:s0 tclass=capability
:
:
:type=SYSCALL msg=audit(1314147004.511:135): arch=x86_64 syscall=ioctl success=no exit=ENODEV a0=9 a1=8933 a2=7fffae31eaf0 a3=0 items=0 ppid=1 pid=1016 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=lldpad exe=/usr/sbin/lldpad subj=system_u:system_r:lldpad_t:s0 key=(null)
:
:Hash: lldpad,lldpad_t,lldpad_t,capability,sys_module
:
:audit2allow
:
:#============= lldpad_t ==============
:allow lldpad_t self:capability sys_module;
:
:audit2allow -R
:
:#============= lldpad_t ==============
:allow lldpad_t self:capability sys_module;
:

Comment 1 Daniel Walsh 2011-08-24 02:43:04 UTC
Can't we not raise this call if we have ENODEV?  We are quickly going to be ignoring every network facing domain from executing sys_module.

I am thinking of just adding
 
dontaudit domain self:capability sys_module;

Comment 2 Dave Jones 2012-03-22 16:44:23 UTC
[mass update]
kernel-3.3.0-4.fc16 has been pushed to the Fedora 16 stable repository.
Please retest with this update.

Comment 3 Dave Jones 2012-03-22 16:48:47 UTC
[mass update]
kernel-3.3.0-4.fc16 has been pushed to the Fedora 16 stable repository.
Please retest with this update.

Comment 4 Dave Jones 2012-03-22 16:58:04 UTC
[mass update]
kernel-3.3.0-4.fc16 has been pushed to the Fedora 16 stable repository.
Please retest with this update.

Comment 5 Dave Jones 2012-08-15 14:38:38 UTC
any program that opens a socket with a protocol that isn't loaded yet is going to trigger a modprobe.

I'm not sure what you expect the kernel to do here.

Comment 6 Daniel Walsh 2012-08-15 18:13:22 UTC
The difference is whether or not the kernel_t is getting the modprobe versus the individual type.  Theoretically the kernel would only load kernel modules that it owns whereas allow a process to execute sys_module allows it to modify the kernel with its content.

Comment 7 Dave Jones 2012-08-15 18:37:59 UTC
I don't know how the contexts are passed around when networking does its request_module calls. Maybe something can be done there to force it to be kernel_t.  Eric ?

Comment 8 Stephen Smalley 2012-08-15 19:10:06 UTC
This is due to commit 8909c9?
If you add a netdev-* alias for the relevant modules, then it should only require CAP_NET_ADMIN here and not CAP_SYS_MODULE.

Comment 9 Fedora End Of Life 2013-01-16 15:41:26 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Fedora End Of Life 2013-02-13 18:48:42 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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