From: Eric Paris <eparis@redhat.com>
To: selinux@tycho.nsa.gov
Cc: sds@tycho.nsa.gov
Subject: FILE__EXECMOD and other assorted file permission layout issues
Date: Tue, 15 Dec 2009 16:53:04 -0500 [thread overview]
Message-ID: <1260913984.2788.80.camel@localhost> (raw)
I started poking around the other day and realized FILE__EXECMOD and how
it is used can be problematic. Namely with blk files it is possible to
cause the kernel to check SECCLASS_BLK_FILE + FILE__EXECMOD. Turns out
0x00080000 isn't defined for SECCLASS_BLK_FILE. It appears at some
point in history the same thing was found for char files and we added
EXECUTE_NO_TRANS and ENTRYPOINT to get it to line up.
We can't leave it the way it is for block files as if a perm ever gets
to there the kernel could check the wrong thing. The 'easiest' fix is
to move the EXECMOD declaration into COMMON_FILE_PERMS, and I'm assuming
you can't call mmap + write + mprotect on a socket, else we need to move
it to COMMON_FILE_SOCK_PERMS if I understand correctly.
If you agree it's a problem we should address and this is a good method
I'll look into the details.
The other thing I noticed is that we don't use FILE__SWAPON at all.
Should I just drop SWAPON from the list of kernel perms?
OPEN. I did the horrid per secclass open perms. Should I move that
into COMMON_FILE_SOCK_PERMS and drop all of the special case code?
-Eric
--
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 reply other threads:[~2009-12-15 21:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 21:53 Eric Paris [this message]
2009-12-16 15:21 ` FILE__EXECMOD and other assorted file permission layout issues 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=1260913984.2788.80.camel@localhost \
--to=eparis@redhat.com \
--cc=sds@tycho.nsa.gov \
--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.