FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora SELinux Support

 
 
LinkBack Thread Tools
 
Old 09-14-2008, 10:44 AM
"Frank Murphy"
 
Default AVC Denials x2 - No Network Connection Long-Post

Basically this is F9 on a USB-Stick, installed as "install to hd"
upgraded full to newkey status.
restorecon -v '/var/lib/dhclient/dhclient-eth0.leases' -:- No change to avc(s)

Summary:

SELinux is preventing consoletype (consoletype_t) "read" to
/var/lib/dhclient/dhclient-eth0.leases (dhcpc_state_t).

Detailed Description:

SELinux denied access requested by consoletype. It is not expected that this
access is required by consoletype 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:

Sometimes labeling problems can cause SELinux denials. You could try to restore
the default system file context for /var/lib/dhclient/dhclient-eth0.leases,

restorecon -v '/var/lib/dhclient/dhclient-eth0.leases'

If this does not work, there is currently no automatic way to allow this access.
Instead, you can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.

Additional Information:

Source Context unconfined_u:system_r:consoletype_t:s0
Target Context unconfined_ubject_r:dhcpc_state_t:s0
Target Objects /var/lib/dhclient/dhclient-eth0.leases [ file ]
Source consoletype
Source Path /sbin/consoletype
Port <Unknown>
Host usbstick-01
Source RPM Packages initscripts-8.76-1
Target RPM Packages
Policy RPM selinux-policy-3.3.1-42.fc9
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name catchall_file
Host Name usbstick-01
Platform Linux usbstick-01 2.6.25-14.fc9.i686 #1 SMP Thu
May 1 06:28:41 EDT 2008 i686 i686
Alert Count 3
First Seen Sat 13 Sep 2008 17:54:44 IST
Last Seen Sun 14 Sep 2008 10:48:26 IST
Local ID d216653d-c0e7-4df0-81bd-c9ee3c1d542b
Line Numbers

Raw Audit Messages

host=usbstick-01 type=AVC msg=audit(1221385706.55:48): avc: denied {
read } for pid=4706 comm="consoletype"
path="/var/lib/dhclient/dhclient-eth0.leases" dev=dm-0 ino=47658
scontext=unconfined_u:system_r:consoletype_t:s0
tcontext=unconfined_ubject_r:dhcpc_state_t:s0 tclass=file

host=usbstick-01 type=SYSCALL msg=audit(1221385706.55:48):
arch=40000003 syscall=11 success=yes exit=0 a0=844fcb8 a1=844f738
a2=844f958 a3=0 items=0 ppid=4705 pid=4706 auid=500 uid=0 gid=0 euid=0
suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="consoletype"
exe="/sbin/consoletype" subj=unconfined_u:system_r:consoletype_t:s0
key=(null)





Summary:

SELinux is preventing ifconfig (ifconfig_t) "read" to
/var/lib/dhclient/dhclient-eth0.leases (dhcpc_state_t).

Detailed Description:

SELinux denied access requested by ifconfig. It is not expected that this access
is required by ifconfig 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:

Sometimes labeling problems can cause SELinux denials. You could try to restore
the default system file context for /var/lib/dhclient/dhclient-eth0.leases,

restorecon -v '/var/lib/dhclient/dhclient-eth0.leases'

If this does not work, there is currently no automatic way to allow this access.
Instead, you can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.

Additional Information:

Source Context unconfined_u:system_r:ifconfig_t:s0
Target Context unconfined_ubject_r:dhcpc_state_t:s0
Target Objects /var/lib/dhclient/dhclient-eth0.leases [ file ]
Source ifconfig
Source Path /sbin/ifconfig
Port <Unknown>
Host usbstick-01
Source RPM Packages net-tools-1.60-87.fc9
Target RPM Packages
Policy RPM selinux-policy-3.3.1-42.fc9
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name catchall_file
Host Name usbstick-01
Platform Linux usbstick-01 2.6.25-14.fc9.i686 #1 SMP Thu
May 1 06:28:41 EDT 2008 i686 i686
Alert Count 4
First Seen Sat 13 Sep 2008 17:54:44 IST
Last Seen Sun 14 Sep 2008 10:48:26 IST
Local ID c7b6f250-55d9-4401-97db-6503d3d2db46
Line Numbers

Raw Audit Messages

host=usbstick-01 type=AVC msg=audit(1221385706.103:49): avc: denied
{ read } for pid=4726 comm="ifconfig"
path="/var/lib/dhclient/dhclient-eth0.leases" dev=dm-0 ino=47658
scontext=unconfined_u:system_r:ifconfig_t:s0
tcontext=unconfined_ubject_r:dhcpc_state_t:s0 tclass=file

host=usbstick-01 type=SYSCALL msg=audit(1221385706.103:49):
arch=40000003 syscall=11 success=yes exit=0 a0=8490b40 a1=8490960
a2=8477018 a3=0 items=0 ppid=4704 pid=4726 auid=500 uid=0 gid=0 euid=0
suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="ifconfig"
exe="/sbin/ifconfig" subj=unconfined_u:system_r:ifconfig_t:s0
key=(null)



audit2allow -M lease < /var/lib/dhclient/dhclient-eth0.leases
compilation failed:
lease.te:6:ERROR 'syntax error' at token ' on line 6:


/usr/bin/checkmodule: error(s) encountered while parsing configuration
/usr/bin/checkmodule: loading policy configuration from lease.te
[root@usbstick-01 ~]# audit2allow -M local <
'/var/lib/dhclient/dhclient-eth0.leases'
compilation failed:
local.te:6:ERROR 'syntax error' at token ' on line 6:


/usr/bin/checkmodule: error(s) encountered while parsing configuration
/usr/bin/checkmodule: loading policy configuration from local.te


Frank
--
aMSN: Frankly3D

--
fedora-selinux-list mailing list
fedora-selinux-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-selinux-list
 
Old 09-14-2008, 03:30 PM
Frank Murphy
 
Default AVC Denials x2 - No Network Connection Long-Post

On Sun, 2008-09-14 at 11:44 +0100, Frank Murphy wrote:

Sorry for self-reply,
got around it by disabling selinx, then updated to newer policies.Now re
enabled without eth errors.


Frank

--
fedora-selinux-list mailing list
fedora-selinux-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-selinux-list
 
Old 09-15-2008, 01:25 PM
Daniel J Walsh
 
Default AVC Denials x2 - No Network Connection Long-Post

Frank Murphy wrote:
> Basically this is F9 on a USB-Stick, installed as "install to hd"
> upgraded full to newkey status.
> restorecon -v '/var/lib/dhclient/dhclient-eth0.leases' -:- No change to avc(s)
>
> Summary:
>
> SELinux is preventing consoletype (consoletype_t) "read" to
> /var/lib/dhclient/dhclient-eth0.leases (dhcpc_state_t).
>
> Detailed Description:
>
> SELinux denied access requested by consoletype. It is not expected that this
> access is required by consoletype 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:
>
> Sometimes labeling problems can cause SELinux denials. You could try to restore
> the default system file context for /var/lib/dhclient/dhclient-eth0.leases,
>
> restorecon -v '/var/lib/dhclient/dhclient-eth0.leases'
>
> If this does not work, there is currently no automatic way to allow this access.
> Instead, you can generate a local policy module to allow this access - see FAQ
> (http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
> SELinux protection altogether. Disabling SELinux protection is not recommended.
> Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
> against this package.
>
> Additional Information:
>
> Source Context unconfined_u:system_r:consoletype_t:s0
> Target Context unconfined_ubject_r:dhcpc_state_t:s0
> Target Objects /var/lib/dhclient/dhclient-eth0.leases [ file ]
> Source consoletype
> Source Path /sbin/consoletype
> Port <Unknown>
> Host usbstick-01
> Source RPM Packages initscripts-8.76-1
> Target RPM Packages
> Policy RPM selinux-policy-3.3.1-42.fc9
> Selinux Enabled True
> Policy Type targeted
> MLS Enabled True
> Enforcing Mode Enforcing
> Plugin Name catchall_file
> Host Name usbstick-01
> Platform Linux usbstick-01 2.6.25-14.fc9.i686 #1 SMP Thu
> May 1 06:28:41 EDT 2008 i686 i686
> Alert Count 3
> First Seen Sat 13 Sep 2008 17:54:44 IST
> Last Seen Sun 14 Sep 2008 10:48:26 IST
> Local ID d216653d-c0e7-4df0-81bd-c9ee3c1d542b
> Line Numbers
>
> Raw Audit Messages
>
> host=usbstick-01 type=AVC msg=audit(1221385706.55:48): avc: denied {
> read } for pid=4706 comm="consoletype"
> path="/var/lib/dhclient/dhclient-eth0.leases" dev=dm-0 ino=47658
> scontext=unconfined_u:system_r:consoletype_t:s0
> tcontext=unconfined_ubject_r:dhcpc_state_t:s0 tclass=file
>
> host=usbstick-01 type=SYSCALL msg=audit(1221385706.55:48):
> arch=40000003 syscall=11 success=yes exit=0 a0=844fcb8 a1=844f738
> a2=844f958 a3=0 items=0 ppid=4705 pid=4706 auid=500 uid=0 gid=0 euid=0
> suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="consoletype"
> exe="/sbin/consoletype" subj=unconfined_u:system_r:consoletype_t:s0
> key=(null)
>
>
>
>
>
> Summary:
>
> SELinux is preventing ifconfig (ifconfig_t) "read" to
> /var/lib/dhclient/dhclient-eth0.leases (dhcpc_state_t).
>
> Detailed Description:
>
> SELinux denied access requested by ifconfig. It is not expected that this access
> is required by ifconfig 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:
>
> Sometimes labeling problems can cause SELinux denials. You could try to restore
> the default system file context for /var/lib/dhclient/dhclient-eth0.leases,
>
> restorecon -v '/var/lib/dhclient/dhclient-eth0.leases'
>
> If this does not work, there is currently no automatic way to allow this access.
> Instead, you can generate a local policy module to allow this access - see FAQ
> (http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
> SELinux protection altogether. Disabling SELinux protection is not recommended.
> Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
> against this package.
>
> Additional Information:
>
> Source Context unconfined_u:system_r:ifconfig_t:s0
> Target Context unconfined_ubject_r:dhcpc_state_t:s0
> Target Objects /var/lib/dhclient/dhclient-eth0.leases [ file ]
> Source ifconfig
> Source Path /sbin/ifconfig
> Port <Unknown>
> Host usbstick-01
> Source RPM Packages net-tools-1.60-87.fc9
> Target RPM Packages
> Policy RPM selinux-policy-3.3.1-42.fc9
> Selinux Enabled True
> Policy Type targeted
> MLS Enabled True
> Enforcing Mode Enforcing
> Plugin Name catchall_file
> Host Name usbstick-01
> Platform Linux usbstick-01 2.6.25-14.fc9.i686 #1 SMP Thu
> May 1 06:28:41 EDT 2008 i686 i686
> Alert Count 4
> First Seen Sat 13 Sep 2008 17:54:44 IST
> Last Seen Sun 14 Sep 2008 10:48:26 IST
> Local ID c7b6f250-55d9-4401-97db-6503d3d2db46
> Line Numbers
>
> Raw Audit Messages
>
> host=usbstick-01 type=AVC msg=audit(1221385706.103:49): avc: denied
> { read } for pid=4726 comm="ifconfig"
> path="/var/lib/dhclient/dhclient-eth0.leases" dev=dm-0 ino=47658
> scontext=unconfined_u:system_r:ifconfig_t:s0
> tcontext=unconfined_ubject_r:dhcpc_state_t:s0 tclass=file
>
> host=usbstick-01 type=SYSCALL msg=audit(1221385706.103:49):
> arch=40000003 syscall=11 success=yes exit=0 a0=8490b40 a1=8490960
> a2=8477018 a3=0 items=0 ppid=4704 pid=4726 auid=500 uid=0 gid=0 euid=0
> suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="ifconfig"
> exe="/sbin/ifconfig" subj=unconfined_u:system_r:ifconfig_t:s0
> key=(null)
>
>
>
> audit2allow -M lease < /var/lib/dhclient/dhclient-eth0.leases
> compilation failed:
> lease.te:6:ERROR 'syntax error' at token ' on line 6:
>
This should have been audit2allow -M lease < /var/log/audit/audit.log
>
> /usr/bin/checkmodule: error(s) encountered while parsing configuration
> /usr/bin/checkmodule: loading policy configuration from lease.te
> [root@usbstick-01 ~]# audit2allow -M local <
> '/var/lib/dhclient/dhclient-eth0.leases'
> compilation failed:
> local.te:6:ERROR 'syntax error' at token ' on line 6:
>
>
> /usr/bin/checkmodule: error(s) encountered while parsing configuration
> /usr/bin/checkmodule: loading policy configuration from local.te
>
>
> Frank
If you take a look at what these AVC's are saying, you should realize
they make no sense. The AVC's are reporting that consoletype and
application for looking at the current terminal wants to read a file
created by dhclient? Not likely. When I see a avc like this that makes
no sense, my mind instantly thinks leaked file descriptors. When you
see the second avc saying ifconfig_t also wants to read the same file, I
have a pretty good idea this is a leak.

SELinux is just reporting that the dhclient program passed an open file
descriptor that confined domains that it is execing do not have access
to. SELinux is closing the file descriptors and consoletype and
ifconfig are working fine, but SELinux complains about the descriptors.

The dhclient program should get a bugzilla telling them to close the
desctiptors on exec.

fcntl(fd, F_SETFD, FD_CLOEXEC);

This would eliminate a potential security hole and get SELinux to be
quiet.

--
fedora-selinux-list mailing list
fedora-selinux-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-selinux-list
 

Thread Tools




All times are GMT. The time now is 09:31 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org