From: Stephen Smalley <sds@tycho.nsa.gov>
To: Eric Paris <eparis@parisplace.org>, Paul Moore <paul@paul-moore.com>
Cc: SE-Linux <selinux@tycho.nsa.gov>
Subject: Re: Changing unlabeled_t on files to invalid_label_t.
Date: Fri, 10 Jan 2014 09:42:42 -0500 [thread overview]
Message-ID: <52D006E2.5030906@tycho.nsa.gov> (raw)
In-Reply-To: <CACLa4pvs_qwHn3sf-y0bMZ5wSPs6C39nFZGsptDqo=kje2E5tg@mail.gmail.com>
On 01/09/2014 06:07 PM, Eric Paris wrote:
> static int superblock_alloc_security(struct super_block *sb)
> {
> ...
> sbsec->def_sid = SECINITSID_FILE;
>
> static int inode_alloc_security(struct inode *inode)
> {
> struct inode_security_struct *isec;
> ...
> isec->sid = SECINITSID_UNLABELED;
>
> static int inode_doinit_with_dentry(struct inode *inode, struct dentry
> *opt_dentry)
> {
> ...
> if (rc != -ENODATA) {
> sid = sbsec->def_sid;
> ...
> if (rc) {
> ...
> /* Leave with the unlabeled SID */
> rc = 0;
> break;
>
> So there you have it...
>
> I believe we need a new initial sid. SECINITSID_INVALID_LABEL....
Difficult (impossible?) to do in a fully backward compatible manner (to
include the case of loading new policy on old kernel, whether initially
or update/reload on an already running kernel with an older policy).
SECINITSID_NUM is baked into the kernel, as are the indices.
You are more likely to have success by reusing one of the currently
unused initial SIDs for a new purpose, especially as some of them have
never been used in any mainline kernel (some of them predate Linux 2.6.0).
Dynamic initial sid lookup (ala the dynamic class/perm lookup) support
would be nice to have, but at most that will allow us to delete obsolete
initial SIDs from refpolicy, not fix old kernels.
next prev parent reply other threads:[~2014-01-10 14:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 21:53 Changing unlabeled_t on files to invalid_label_t Daniel J Walsh
2014-01-09 22:21 ` Dominick Grift
2014-01-09 22:49 ` Dominick Grift
2014-01-10 0:26 ` Paul Moore
2014-01-09 22:54 ` Paul Moore
2014-01-09 23:07 ` Eric Paris
2014-01-09 23:22 ` Dominick Grift
2014-01-10 0:23 ` Paul Moore
2014-01-10 11:52 ` Dominick Grift
2014-01-10 14:42 ` Paul Moore
2014-01-10 14:42 ` Stephen Smalley [this message]
2014-01-10 14:49 ` Paul Moore
2014-01-10 14:56 ` Stephen Smalley
2014-01-10 16:13 ` Stephen Smalley
2014-01-10 16:23 ` Paul Moore
2014-01-12 1:37 ` Russell Coker
2014-01-09 22:23 ` Ted Toth
2014-01-09 22:45 ` Paul Moore
2014-01-10 16:06 ` Stephen Smalley
2014-01-10 16:13 ` Daniel J Walsh
2014-01-10 16:14 ` Stephen Smalley
2014-01-13 20:07 ` Christopher J. PeBenito
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=52D006E2.5030906@tycho.nsa.gov \
--to=sds@tycho.nsa.gov \
--cc=eparis@parisplace.org \
--cc=paul@paul-moore.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.