All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell Coker <russell@coker.com.au>
To: jwcart2@epoch.ncsc.mil
Cc: SELinux <selinux@tycho.nsa.gov>
Subject: Re: policy patches
Date: Sat, 2 Oct 2004 03:44:04 +1000	[thread overview]
Message-ID: <200410020344.04225.russell@coker.com.au> (raw)
In-Reply-To: <1096648965.13366.35.camel@moss-lions.epoch.ncsc.mil>

[-- Attachment #1: Type: text/plain, Size: 2652 bytes --]

On Sat, 2 Oct 2004 02:42, James Carter <jwcart2@epoch.ncsc.mil> wrote:
> Mostly merged with the corrections.
>
> These two lines caused things to break, so I held off merging these for
> now.
> +/sbin/kmodule  --      system_u:object_r:kudzu_exec_t
> +/sbin/start_udev --    system_u:object_r:udev_exec_t
>
> These are the denials I am seeing:
> avc:  denied  { unlink } for  pid=705 exe=/bin/rm name=.udev.tdb dev=tmpfs
> ino=927 scontext=system_u:system_r:udev_t

Version 7.85-1 of the initscripts package fixes the restorecon command to use 
the -R option to label all of /dev.  If you upgrade to the latest rawhide 
then the start_udev labelling should work.  NB  I sent the patch to you 
before rawhide was fixed, this was intentional as neither patch worked well 
without the other so there was no benefit in delaying.

> avc:  denied  { search } for  pid=856 exe=/sbin/kmodule
> name=usr dev=hda2 ino=162881 scontext=system_u:system_r:kudzu_t
> tcontext=user_u:object_r:file_t tclass=dir

Looks like either mis-labelling or you have /usr on a different file system.  
I guess we have to add a dontaudit rule for that for when /usr (or /var or 
whatever else it may access that isn't on the root fs).

> avc:  denied  { getattr } for  
> pid=856 exe=/sbin/kmodule path=/lib/modules/2.6.8-1.541/kernel dev=hda2
> ino=930725 scontext=system_u:system_r:kudzu_t
> tcontext=system_u:object_r:modules_object_t tclass=dir

I've attached kudzu.diff to deal with this issue and the above.  Please try 
including those file contexts changes, with kudzu.diff and the latest 
initscripts it should be fine.

> avc:  denied  { 
> setattr } for  pid=2402 exe=/usr/X11R6/bin/Xorg name=dri dev=tmpfs ino=7757
> scontext=system_u:system_r:xdm_xserver_t
> tcontext=system_u:object_r:device_t tclass=dir

I think that Dan's latest patch allowed that one.

> The xdm_xserver_t device_t:dir setattr denial is not due to this patch.
> It is the only denial that I have been seeing lately; I just haven't had
> an opportunity to look into it more.  It doesn't appear to cause any
> problems though.

Long term udev has to deal with that too.  The X server should not be creating 
device nodes.  Quite a bit of work has recently gone into reducing /dev/mem 
access but allowing arbitrary device node creation wastes that.  It'll be 
fixed eventually (but at the moment we are already busy enough with udev 
issues).

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

[-- Attachment #2: kudzu.diff --]
[-- Type: text/x-diff, Size: 879 bytes --]

--- /usr/src/se/policy/domains/program/unused/kudzu.te	2004-10-02 03:36:11.000000000 +1000
+++ domains/program/unused/kudzu.te	2004-10-02 03:40:37.000000000 +1000
@@ -15,7 +15,7 @@
 allow kudzu_t etc_t:file { getattr read };
 allow kudzu_t self:capability { dac_override sys_admin sys_rawio net_admin sys_tty_config };
 allow kudzu_t modules_conf_t:file { getattr read };
-allow kudzu_t modules_object_t:dir { search };
+allow kudzu_t modules_object_t:dir { getattr search };
 allow kudzu_t modules_dep_t:file { getattr read };
 allow kudzu_t mouse_device_t:chr_file { read write };
 allow kudzu_t proc_t:file { getattr read };
@@ -81,3 +81,6 @@
 file_type_auto_trans(kudzu_t, etc_t, etc_runtime_t, file)
 allow kudzu_t tape_device_t:chr_file r_file_perms;
 allow kudzu_t tmp_t:dir { search };
+
+# for file systems that are not yet mounted
+dontaudit kudzu_t file_t:dir search;

  reply	other threads:[~2004-10-01 17:44 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-29 13:54 policy patches Russell Coker
2004-09-29 17:45 ` Thomas Bleher
2004-09-29 20:20   ` Russell Coker
2004-10-01 16:42     ` James Carter
2004-10-01 17:44       ` Russell Coker [this message]
2004-10-01 20:45         ` Daniel J Walsh
2004-10-02  0:42           ` Russell Coker
2004-10-02 10:16             ` Daniel J Walsh
2004-10-02 20:14               ` Russell Coker
2004-10-06 15:28                 ` Daniel J Walsh
2004-10-10 17:37                   ` Russell Coker
2004-10-02  0:43           ` Russell Coker
2004-10-02 10:18             ` Daniel J Walsh
2004-10-02 20:15               ` Russell Coker
2004-10-04 20:12         ` James Carter
2004-10-05 15:41           ` Daniel J Walsh
2004-10-05 17:35             ` James Carter
     [not found]               ` <4162DEC3.4050306@redhat.com>
2004-10-05 18:22                 ` James Carter
2004-10-05 19:06             ` James Carter
2004-10-06 10:10               ` Luke Kenneth Casson Leighton
2004-10-06 11:40                 ` Erich Schubert
2004-10-06 12:32                 ` James Carter
2004-10-06 13:13                 ` Daniel J Walsh
2004-10-06 13:50                   ` Luke Kenneth Casson Leighton
  -- strict thread matches above, loose matches on Subject: below --
2005-09-19  5:13 Russell Coker
2005-01-02 12:03 Russell Coker
2005-01-04 19:33 ` James Carter
2005-01-05 16:45 ` James Carter
2004-09-16 11:51 hald fix Russell Coker
2004-09-16 14:52 ` James Carter
2004-09-16 21:23   ` Policy patches Daniel J Walsh
2004-09-17 12:07     ` Russell Coker
2004-09-20 20:03       ` James Carter
2004-09-17 20:56     ` James Carter
2004-09-20 12:35       ` Daniel J Walsh
2004-09-21 20:55         ` Daniel J Walsh
2004-09-22 20:21           ` James Carter
2004-08-19 12:57 policy patches Russell Coker
2004-08-20 19:07 ` Stephen Smalley
2003-04-26  7:30 Russell Coker
2003-03-27 18:25 Kelly_Djahandari
2003-03-26 17:47 Kelly_Djahandari
2003-03-22 22:53 Russell Coker
2003-03-22 22:14 Russell Coker
2003-03-24 17:13 ` Wayne Salamon
2002-11-04 12:41 Russell Coker
2002-09-09 22:59 Russell Coker
2002-09-21  2:39 ` Stephen Smalley
2002-08-09 15:30 Russell Coker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200410020344.04225.russell@coker.com.au \
    --to=russell@coker.com.au \
    --cc=jwcart2@epoch.ncsc.mil \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.