From: KaiGai Kohei <kaigai@ak.jp.nec.com>
To: Jason Johnson <jason.johnson.081@gmail.com>
Cc: SE-Linux <selinux@tycho.nsa.gov>
Subject: Re: Possible bug with fd class?
Date: Tue, 16 Jun 2009 14:18:39 +0900 [thread overview]
Message-ID: <4A372B2F.9000804@ak.jp.nec.com> (raw)
In-Reply-To: <aa22f0200906152148g77b0c37fo56c78fc5bb7dfa71@mail.gmail.com>
Jason Johnson wrote:
> Hello all,
>
> I am using SELinux on the latest debian. It has a few access
> violations here and there, but the one that concerns me most is:
>
> kernel: [1298522.518701] type=1400 audit(1245126419.780:229): avc:
> denied { use } for pid=29944 comm="syslog-ng" path="/dev/null"
> dev=tmpfs ino=634 scontext=system_u:system_r:syslogd_t:s0
> tcontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tclass=fd
>
>
> /dev/null is:
>
> # semanage fcontext -l|grep null_device_t
> /dev/null character device
> system_u:object_r:null_device_t:s0
> /dev/full character device
> system_u:object_r:null_device_t:s0
>
>
> I don't see a way with semanage to set anything about class "fd" and
> sesearch didn't seem to turn anything up. How could /dev/null fd be
> in context logrotate_t?
The "fd" class represents a file descriptor object, not any filesystem
objects. For example, if you open the /tmp/aaa, this file belongs to
"file" class, but the file descriptor of the file belongs to "fd" class.
It seems to me the policy does not allow:
logrotate_use_fds(syslogd_t)
> I could just add an allow for this on a local module, but my concern
> is: can a user program just set arbitrary fd's to it's own target
> context as well?
The fd class inherits the security context of the process which opened
itself.
> I appreciate any insight you all can give.
>
> Sincerely,
> Jason
>
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
> the words "unsubscribe selinux" without quotes as the message.
>
>
--
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2009-06-16 5:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-16 4:48 Possible bug with fd class? Jason Johnson
2009-06-16 5:18 ` KaiGai Kohei [this message]
2009-06-16 17:31 ` Jason Johnson
2009-06-16 20:01 ` Stephen Smalley
2009-06-16 21:13 ` Jason Johnson
2009-06-17 12:26 ` Stephen Smalley
2009-06-17 18:28 ` Jason Johnson
2009-06-17 19:13 ` Stephen Smalley
2009-06-17 19:17 ` Stephen Smalley
[not found] ` <aa22f0200906172153n2c67abcj1309a76208c5b96e@mail.gmail.com>
2009-06-18 12:48 ` Stephen Smalley
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=4A372B2F.9000804@ak.jp.nec.com \
--to=kaigai@ak.jp.nec.com \
--cc=jason.johnson.081@gmail.com \
--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.