From: Paul Moore <paul@paul-moore.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: SELinux-NSA <selinux@tycho.nsa.gov>,
Andy Lutomirski <luto@amacapital.net>
Subject: Re: [PATCH v2] selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID.
Date: Thu, 28 Aug 2014 17:36:38 -0400 [thread overview]
Message-ID: <35237187.pLesj1POuT@sifl> (raw)
In-Reply-To: <53EA692A.1030705@tycho.nsa.gov>
On Tuesday, August 12, 2014 03:21:14 PM Stephen Smalley wrote:
> Attached is the patch for the selinux-testsuite,
> against git://git.selinuxproject.org/~serge/selinux-testsuite.
> Once it goes into a kernel I can make the test kernel version-specific
> and thus ensure it passes on old and new kernels.
I just applied the kernel patch to the SELinux next branch and ran the
testsuite against it to ensure everything was okay and ran into the problems
below:
<<<<
Running as user root with context unconfined_u:unconfined_r:unconfined_t
domain_trans/test ....... ok
entrypoint/test ......... ok
execshare/test .......... ok
exectrace/test .......... ok
execute_no_trans/test ... ok
fdreceive/test .......... ok
inherit/test ............ ok
link/test ............... ok
mkdir/test .............. ok
msg/test ................ ok
nnp/test ................ 1/4 # Test 1 got: "32256" (nnp/test at line 19)
# Expected: "0"
# nnp/test line 19 is: ok($result,0); #this should pass
# Test 2 got: "256" (nnp/test at line 23)
# Expected: "0"
# nnp/test line 23 is: ok($result,0); #this should pass
nnp/test ................ Failed 2/4 subtests
open/test ............... ok
ptrace/test ............. ok
readlink/test ........... ok
relabel/test ............ ok
rename/test ............. ok
rxdir/test .............. ok
sem/test ................ ok
setattr/test ............ ok
setnice/test ............ ok
shm/test ................ ok
sigkill/test ............ ok
stat/test ............... ok
sysctl/test ............. ok
task_create/test ........ ok
task_setnice/test ....... ok
task_setscheduler/test .. ok
task_getscheduler/test .. ok
task_getsid/test ........ ok
task_getpgid/test ....... ok
task_setpgid/test ....... ok
wait/test ............... ok
file/test ............... ok
ioctl/test .............. ok
capable_file/test ....... ok
capable_net/test ........ ok
capable_sys/test ........ ok
dyntrans/test ........... ok
dyntrace/test ........... ok
bounds/test ............. ok
<<<<
When I run the test by hand using the command line below, the following
appears in the audit log:
# ls -Z checkcon
unconfined_u:object_r:test_nnp_bounded_exec_t:s0 checkcon
# ./execnnp runcon -t test_nnp_bounded_t ./checkcon test_nnp_bounded_t
runcon: ./checkcon: Permission denied
<<<<
type=SELINUX_ERR msg=audit(1409261360.961:1953): op=security_compute_av
reason=bounds scontext=unconfined_u:unconfined_r:test_nnp_bounded_t:s0-
s0:c0.c1023 tcontext=unconfined_u:object_r:test_nnp_bounded_exec_t:s0
tclass=file perms=entrypoint
type=AVC msg=audit(1409261360.961:1953): avc: denied { entrypoint } for
pid=15556 comm="runcon" path="/root/sources/selinux_testsuite-
upstream/tests/nnp/checkcon" dev="vda3" ino=423593
scontext=unconfined_u:unconfined_r:test_nnp_bounded_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:test_nnp_bounded_exec_t:s0 tclass=file
permissive=0
type=SYSCALL msg=audit(1409261360.961:1953): arch=c000003e syscall=59
success=no exit=-13 a0=7fffd720e76c a1=7fffd720df50 a2=7fffd720df68
a3=6e5f747365743a72 items=0 ppid=4569 pid=15556 auid=0 uid=0 gid=0 euid=0
suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=4 comm="runcon"
exe="/usr/bin/runcon" subj=unconfined_u:unconfined_r:unconfined_t:s0-
s0:c0.c1023 key=(null)
<<<<
Unfortunately that is about as far as I'm going to be able to get today on
this, so I'm tossing this out hoping you'll have an answer before I can touch
this next.
--
paul moore
www.paul-moore.com
next prev parent reply other threads:[~2014-08-28 21:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-04 17:36 [PATCH v2] selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID Stephen Smalley
2014-08-12 18:01 ` Andy Lutomirski
2014-08-12 18:06 ` Stephen Smalley
2014-08-12 18:56 ` Andy Lutomirski
2014-08-12 19:08 ` Paul Moore
2014-08-12 19:12 ` Andy Lutomirski
2014-08-12 19:21 ` Stephen Smalley
2014-08-12 19:29 ` Andy Lutomirski
2014-08-28 21:36 ` Paul Moore [this message]
2014-08-29 13:12 ` Stephen Smalley
2014-08-29 18:20 ` Paul Moore
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=35237187.pLesj1POuT@sifl \
--to=paul@paul-moore.com \
--cc=luto@amacapital.net \
--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.