Skip to contentSkip to conversation

Denials from newest kernel

DISCUSSION Joshua Brindle 5 participants 7 messages Oct 6, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

I grabbed Erics new kernel builds and installed them and got some interesting denials. I started with no secmark rules whatsoever on the machine.

avc: denied { flow_out } for pid=1815 comm="avahi-daemon" saddr=10.1.13.105 daddr=224.0.0.22 netif=eth0 scontext=system_u:object_r:unlabeled_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=packet

the target seems reasonable (unlabeled_t since there are no secmark rules) but the target should have been network_t (the unlabeled association) right?

avc: denied { flow_in } for pid=1815 comm="avahi-daemon" scontext=system_u:object_r:unlabeled_t:s0 tcontext=system_u:system_r:avahi_t:s0 tclass=packet

don't understand this one at all, source should be network_t (i thought) and target should be a packet object (and there aren't any). Why is it getting the domain context?

avc: denied { recv } for pid=1815 comm="avahi-daemon" src=5353 dest=5353 netif=eth0 scontext=system_u:system_r:avahi_t:s0 tcontext=system_u:system_r:avahi_t:s0 tclass=packet

So the source here seems correct but the target is avahi_t again..

I'm going to load up some secmark rules as soon as I get an iptables build that lets me (wonder why rawhides doesn't come with SECMARK :\ ) and try this again.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 3 lines · Joshua Brindle

I'm going to load up some secmark rules as soon as I get an iptables build that lets me (wonder why rawhides doesn't come with SECMARK :\ ) and try this again.

You need compat_net=1 to test what FC6 and RHEL5 will be shipping.

Signature · 7 lines
James Morris
<[email protected]>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 2 lines

You need compat_net=1 to test what FC6 and RHEL5 will be shipping.

FC6 turned off secmark support, but RHEL5 has it on.

-Steve

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#3 lore raw
Quoted 4 lines · Steve G
Quoted 2 lines

You need compat_net=1 to test what FC6 and RHEL5 will be shipping.

FC6 turned off secmark support, but RHEL5 has it on.

Is there policy to support secmark properly in RHEL5? If not, it needs to be disabled.

Signature · 7 lines
James Morris
<[email protected]>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#4 lore raw
Quoted 4 lines · James Morris

Is there policy to support secmark properly in RHEL5? If not, it needs
to be disabled.

refpolicy defines the secmark rules and the selinux rules so that is fine, however there is no infrastructure to get the netfilter_contexts into the running iptables so things explode quickly.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#5 lore raw
Quoted 9 lines · Joshua Brindle
Quoted 4 lines · James Morris

Is there policy to support secmark properly in RHEL5? If not, it needs
to be disabled.

refpolicy defines the secmark rules and the selinux rules so that is fine, however there is no infrastructure to get the netfilter_contexts into the running iptables so things explode quickly.

Not entirely accurate; anyone that has networking can send and receive unlabeled_t packets currently. It originally was a temporary compatibility thing until we could figure out how to manage the labels. But since that part hasn't been figured out, the decision was made to turn on secmark with no labeling rules and put the unlabeled packet perms in, but make them conditional (a boolean). So if someone wanted to constrain networking, they could load up the iptables labeling rules, and disable the boolean. The boolean has not been implemented yet, but it should be straightforward.

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#6 lore raw
In reply to Joshua Brindle
Quoted 3 lines · Joshua Brindle

I grabbed Erics new kernel builds and installed them and got some interesting denials. I started with no secmark rules whatsoever on the machine.

Okay, some more data for everybody to chew on. For my tests I used the lspp.51 kernel as well as the kernel and MLS policy generated from the source RPMs posted here:

* http://free.linux.hp.com/~pmoore/files

The only differences between these source RPMs are the original is the removal of the NetLabel/secid patch in the kernel and the addition of "network_t:s0-s15:c0.c255" to the netmsg initial SID.

The summary is that I see no difference between the kernel with the NetLabel/secid patch and the one without.

* flow_out permission

Joshua reported:

Quoted 4 lines

avc: denied { flow_out } for pid=1815 comm="avahi-daemon" saddr=10.1.13.105 daddr=224.0.0.22 netif=eth0 scontext=system_u:object_r:unlabeled_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=packet

With the lspp.51 kernel I see:

type=AVC msg=audit(1160160485.587:61): avc: denied { flow_out } for pid=2297 comm="avahi-daemon" saddr=10.0.0.255 src=5353 daddr=224.0.0.251 dest=5353 netif=eth0 scontext=root:staff_r:staff_t:s0-s15:c0.c255 tcontext=system_u:object_r:network_t:s0-s15:c0.c255 tclass=packet

With the lspp.51 kernel w/o NetLabel/secid I see:

type=AVC msg=audit(1160160670.049:61): avc: denied { flow_out } for pid=2289 comm="avahi-daemon" saddr=10.0.0.255 src=5353 daddr=224.0.0.251 dest=5353 netif=eth0 scontext=root:staff_r:staff_t:s0-s15:c0.c255 tcontext=system_u:object_r:network_t:s0-s15:c0.c255 tclass=packet

* flow_in permission

Joshua reported:

Quoted 3 lines

avc: denied { flow_in } for pid=1815 comm="avahi-daemon" scontext=system_u:object_r:unlabeled_t:s0 tcontext=system_u:system_r:avahi_t:s0 tclass=packet

With the lspp.51 kernel I see:

type=AVC msg=audit(1160160485.587:61): avc: denied { flow_in } for pid=2297 comm="avahi-daemon" scontext=system_u:object_r:unlabeled_t:s15:c0.c255 tcontext=system_u:object_r:network_t:s0-s15:c0.c255 tclass=packet

With the lspp.51 kernel w/o NetLabel/secid I see:

type=AVC msg=audit(1160160670.049:61): avc: denied { flow_in } for pid=2289 comm="avahi-daemon" scontext=system_u:object_r:unlabeled_t:s15:c0.c255 tcontext=system_u:object_r:network_t:s0-s15:c0.c255 tclass=packet

* recv permission

Joshua reported:

Quoted 4 lines

avc: denied { recv } for pid=1815 comm="avahi-daemon" src=5353 dest=5353 netif=eth0 scontext=system_u:system_r:avahi_t:s0 tcontext=system_u:system_r:avahi_t:s0 tclass=packet

I still get nothing as reported before.

Signature · 7 lines
paul moore
linux security @ hp

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.