Bug 521397 - setroubleshoot: SELinux is preventing modprobe "read write" access to to a leaked file descriptor on socket
Summary: setroubleshoot: SELinux is preventing modprobe "read write" access to to...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: iptables
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:4889d9e8872...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-05 14:37 UTC by Nicolas Mailhot
Modified: 2009-09-17 09:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-17 09:31:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nicolas Mailhot 2009-09-05 14:37:50 UTC
The following was filed automatically by setroubleshoot:

Résumé:

SELinux is preventing modprobe "read write" access to to a leaked file
descriptor on socket

Description détaillée:

[modprobe has a permissive type (insmod_t). This access was not denied.]

SELinux denied access requested by the modprobe command. It looks like this is
either a leaked descriptor or modprobe output was redirected to a file it is not
allowed to access. Leaks usually can be ignored since SELinux is just closing
the leak and reporting the error. The application does not use the descriptor,
so it will run properly. If this is a redirection, you will not get output in
the socket. You should generate a bugzilla on selinux-policy, and it will get
routed to the appropriate package. You can safely ignore this avc.

Autoriser l'accès:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385)

Informations complémentaires:

Contexte source               unconfined_u:system_r:insmod_t:s0
Contexte cible                unconfined_u:system_r:iptables_t:s0
Objets du contexte            socket [ rawip_socket ]
source                        modprobe
Chemin de la source           /sbin/modprobe
Port                          <Inconnu>
Hôte                         (removed)
Paquetages RPM source         module-init-tools-3.9-2.fc12
Paquetages RPM cible          
Politique RPM                 selinux-policy-3.6.30-2.fc12
Selinux activé               True
Type de politique             targeted
MLS activé                   True
Mode strict                   Enforcing
Nom du plugin                 leaks
Nom de l'hôte                (removed)
Plateforme                    Linux (removed) 2.6.31-0.203.rc8.git2.fc12.x86_64
                              #1 SMP Fri Sep 4 21:33:05 EDT 2009 x86_64 x86_64
Compteur d'alertes            1
Première alerte              sam. 05 sept. 2009 16:02:58 CEST
Dernière alerte              sam. 05 sept. 2009 16:02:58 CEST
ID local                      08915a03-0b63-46bd-8b72-6e5ef841588b
Numéros des lignes           

Messages d'audit bruts        

node=(removed) type=AVC msg=audit(1252159378.537:38): avc:  denied  { read write } for  pid=1885 comm="modprobe" path="socket:[15302]" dev=sockfs ino=15302 scontext=unconfined_u:system_r:insmod_t:s0 tcontext=unconfined_u:system_r:iptables_t:s0 tclass=rawip_socket

node=(removed) type=SYSCALL msg=audit(1252159378.537:38): arch=c000003e syscall=59 success=yes exit=0 a0=14285b0 a1=7fff9f8a2d60 a2=7fff9f8a6560 a3=7fff9f8a2af0 items=0 ppid=1882 pid=1885 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty1 ses=1 comm="modprobe" exe="/sbin/modprobe" subj=unconfined_u:system_r:insmod_t:s0 key=(null)


audit2allow suggests:

#============= insmod_t ==============
allow insmod_t iptables_t:rawip_socket { read write };

Comment 1 Daniel Walsh 2009-09-08 22:15:04 UTC
iptables or its parent is leaking a file descriptor to a rawip_socket.

Comment 2 Nicolas Mailhot 2009-09-10 06:43:59 UTC
trigered by a simple

# /etc/init.d/iptables status

in a term

Comment 3 Daniel Walsh 2009-09-10 12:28:17 UTC
So looks like iptables command is leaking.

fcntl(socketfd, F_SETFD, FD_CLOEXEC)

Comment 4 Thomas Woerner 2009-09-17 09:31:35 UTC
Fixed in rawhide in package iptables-1.4.5-1 or newer.


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