refpoliy issues
Reference policy issues I've come around recently:
- sxid not in role system_r, missing access to /dev
- cron needs to su for certain cronjobs
- semanage writes netfilter_contexts to default_contexts instead of the files subdir (default contexts is read only for semanage)?
- load_policy tries to contact setrans, but I don't have setrans (found also no docs on it or source...) - but the rules to search /var/run are only active when setrans policy was loaded. This probably applies to other apps as well.
and it tries to make a unix_stream_socket
I don't know much about this one:
kernel: audit(1155735318.128:5897): avc: denied { relabelfrom } for pid=3325 comm="sshd" name="0" dev=devpts ino=2 scontext=system_u:system_r:sshd_t:s0-s0:c0.c255 tcontext=root:object_r:sysadm_devpts_t:s0 tclass=chr_file
on each ssh login.
best regards,
Erich Schubert
Signature · 12 lines
erich@(vitavonni.de|debian.org) -- GPG Key ID: 4B3A135C (o_
Friends are those who reach out for //\
your hand but touch your heart. V_/_
Mathematik ist die Kunst, verschiedene Dinge mit demselben
Namen zu belegen. --- Henri Poincaré
--
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.Quoted 3 lines · Erich Schubert
Reference policy issues I've come around recently:
- sxid not in role
system_r, missing access to /dev
Already fixed the role. You'll have to be more specific about access to /dev.
Quoted 1 line
- cron needs to su for certain cronjobs
Can you be more specific?
Quoted 2 lines
- semanage writes
netfilter_contextstodefault_contextsinstead of the files subdir (default contexts is read only for semanage)?
Already added the rule. Putting netfilter_contexts in files doesn't make any sense because its not for file labeling.
Quoted 5 lines
-
load_policytries to contact setrans, but I don't have setrans (found also no docs on it or source...) - but the rules to search/var/runare only active when setrans policy was loaded. This probably applies to other apps as well.
and it tries to make aunix_stream_socket
I believe setrans is in fedora cvs. The access looks like its only due to libselinux's init; however, if you're using MLS or MCS, you're really going to want the translation daemon anyway.
Quoted 8 lines
I don't know much about this one:
kernel: audit(1155735318.128:5897): avc: denied { relabelfrom } for pid=3325 comm="sshd" name="0" dev=devpts ino=2 scontext=system_u:system_r:sshd_t:s0-s0:c0.c255 tcontext=root:object_r:sysadm_devpts_t:s0 tclass=chr_file
on each ssh login.
Based on the evidence that relabelfrom on unpriv user ptys is dontaudited, my guess is this is also a dontaudit. I'm guessing you have sysadm ssh login on?
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.
Hi Christopher,
Quoted 3 lines
Quoted 1 line
- sxid not in role
system_r, missing access to /devAlready fixed the role. You'll have to be more specific about access to /dev.
How about /dev/*
sxid by nature tries to getattr all files there.
Quoted 2 lines
Quoted 1 line
- cron needs to su for certain cronjobs
Can you be more specific?
Amavisd-new for example. /etc/cron.daily/* support, because these files don't have cron syntax, but are plain shell scripts.
But I had the impression that adding su for system_crond_t is the clean way, so it wouldn't really matter which of the jobs in there uses su...
Quoted 3 lines
I believe setrans is in fedora cvs. The access looks like its only due to libselinux's init; however, if you're using MLS or MCS, you're really going to want the translation daemon anyway.
I agree that I want setrans if I manage to get it from somewhere and some docs how to set it up... still we should probably handle these errors. I don't know if they occur on non-MLS-non-MCS systems, though. But right now, I guess more people might be affected by this.
Quoted 3 lines
Based on the evidence that relabelfrom on unpriv user ptys is dontaudited, my guess is this is also a dontaudit. I'm guessing you have sysadm ssh login on?
Yes, that makes selinux policy debugging a bit easier, not having to auth all the time.
best regards,
Erich Schubert
Signature · 9 lines
erich@(vitavonni.de|debian.org) -- GPG Key ID: 4B3A135C (o_
It's not denial. I'm just selective about the reality I accept. //\
Wege entstehen, wenn wir sie gehen. V_/_
--
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.Quoted 7 lines · Erich Schubert
Hi Christopher,
Quoted 3 lines
Quoted 1 line
- sxid not in role
system_r, missing access to /devAlready fixed the role. You'll have to be more specific about access to /dev.
How about
/dev/*
sxid by nature tries to getattr all files there.
Still more specific. The typically the only files in /dev are in /dev/.udev. Or do you mean the device nodes and character nodes?
Quoted 8 lines
Quoted 3 lines
I believe setrans is in fedora cvs. The access looks like its only due to libselinux's init; however, if you're using MLS or MCS, you're really going to want the translation daemon anyway.
I agree that I want setrans if I manage to get it from somewhere and some docs how to set it up... still we should probably handle these errors. I don't know if they occur on non-MLS-non-MCS systems, though. But right now, I guess more people might be affected by this.
It doesn't affect standard setups. If MLS is disabled, then all of functions in question return success immediately.
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.
Hi Christopher,
Quoted 5 lines
Quoted 2 lines
How about
/dev/*
sxid by nature tries to getattr all files there.Still more specific. The typically the only files in /dev are in
/dev/.udev. Or do you mean the device nodes and character nodes?
"In Unix, everything is a file".
Yes, I'm referring to the device and character nodes.
Heck, I'm not an sxid expert. In fact I havn't even _read_ an sxid report yet.
It just sounded like a useful tool to me, and it gave me around 1 MB of audit errors by doing getattr on /dev/*
If there are "real" files in there, it will getattr them, too. I bet it getattrs /dev/MAKEDEV, too, and /dev/.udev
Its supposed to show you mysterious new device nodes being created, too!
best regards,
Erich Schubert
Signature · 9 lines
erich@(vitavonni.de|debian.org) -- GPG Key ID: 4B3A135C (o_
It's not denial. I'm just selective about the reality I accept. //\
"Wissen ist Macht" - wenn man das richtige daraus macht. V_/_
--
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.Quoted 8 lines · Erich Schubert
Quoted 3 lines
Quoted 1 line
- cron needs to su for certain cronjobs
Can you be more specific?
Amavisd-new for example.
/etc/cron.daily/*support, because these files don't have cron syntax, but are plain shell scripts.
But I had the impression that adding su forsystem_crond_tis the clean way, so it wouldn't really matter which of the jobs in there uses su...
I think that start-stop-daemon is a better program to use for this. The procedure in Red Hat distributions is to use the runuser program (Red Hat's nearest equivalent to start-stop-daemon) for such things.
Signature · 9 lines
http://etbe.blogspot.com/ My Blog http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/sponsorship.html Sponsoring Free Software development -- 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.