Skip to contentSkip to conversation

SE Linux patch

DISCUSSION Russell Coker 1 participant 1 message Jun 29, 2002 1 message not in the archive SELinux security module

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1025294267.3367.22.camel@lancelot

#1 lore raw
Quoted 4 lines · you

I think there is a tiny bit wrong with the current patches. I was using your page for directions on setting it up, so I thought I'd pass this along to you. If there is a better mailing list for this type of thing, let me know.

I have CC'd this to the SE Linux mailing list, hope that's OK.

Quoted 7 lines

While running in dev mode, I was receiving TONS of these:

Jun 28 02:30:32 ids1 kernel: avc:  denied  { read } for  pid=157

exe=/sbin/klogd path=/kmsg dev=00:03 ino=4113 scontext=system_u:system_r:klogd_t tcontext=system_u:system_r:tcp_socket_t tclass=file

Quoted 5 lines

First problem: path=/kmsg .. should obviously be /proc/kmsg. I think avd_d_path() in avc.c is stripping this. No time to figure that one out...

/proc/kmsg should not have a type of tcp_socket_t.

True, I think that the latest kernel patch is required to match the latest packages as it adds a type for "igmp" in the middle of the list. I have just uploaded that patch package to Debian.

Quoted 2 lines

I noticed that in /etc/selinux/initial_sid_context, the first 16 items were this:

[...]

Quoted 4 lines

And a stat /proc/kmsg did in fact give a context of system_u:system_r:tcp_socket_t, but a SID of 16. In the code 16 is supposed to be PROC_KMSG.. so what gives? well the problem seems to be that igmp_packet is missing from these files:

[...]

Quoted 5 lines

This caused everything to be off by one. The patch is below(sorry if its not in the right format. Works with -p1 for sure). Once I made this change things started working as promised.

I'm wondering, how can this have been missed to this point?

Your analysis is correct, your patch is good. The problem was the kernel not matching the policy (this will be a pain for upgrades), maybe we should have a new policy version for this...

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.