From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] two fixups for mount_t: uses mount.tmpfs and manage lock files
Date: Mon, 17 Jan 2011 09:07:27 -0500 [thread overview]
Message-ID: <4D344D1F.4080206@tresys.com> (raw)
In-Reply-To: <SNT139-W13CE70A2052E8B07994D10ABF40@phx.gbl>
On 1/17/2011 6:06 AM, HarryCiao wrote:
> Hi Chirs,
>
> I have tried to come up with the attached patches to label
> /sbin/mount.tmpfs as mount_helper_exec_t, and call corecmd_exec_shell()
> for the mount_helper_t domain rather than the mount_t domain.
>
> But soon I found I could not enforce the domain transition from mount_t
> to mount_helper_t, just since the /sbin/mount.tmpfs is a shell script,
> and the child process forked by mount program would always try to
> execute the bash program in order to run the shell script:
>
> root at qemu-host:/root> mount -t tmpfs none tmp/
> type=1400 audit(1294827015.929:14): avc: denied { execute } for pid=607
> comm="mount" name="bash" dev=sda ino=24596
> scontext=root:sysadm_r:mount_t:s0-s15:c0.c1023
> tcontext=system_u:object_r:shell_exec_t:s0 tclass=file
> root at qemu-host:/root>
>
> So it seems there is no way to enforce the domain transition from
> mount_t into mount_helper_t BEFORE executing the bash, unless we use
> dyntransition and setcurrent permissions to mount_t, but this would
> require we change mount source code to add calls to setcon() and these
> two permissions are recommended never to be used for breaking label
> tranquility.
>
> Any other ideas?
Looks like we'll have to go with your original patch.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
prev parent reply other threads:[~2011-01-17 14:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-21 3:16 [refpolicy] two fixups for mount_t: uses mount.tmpfs and manage lock files HarryCiao
2011-01-10 14:10 ` Christopher J. PeBenito
2011-01-11 3:46 ` HarryCiao
2011-01-17 11:06 ` HarryCiao
2011-01-17 14:07 ` Christopher J. PeBenito [this message]
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=4D344D1F.4080206@tresys.com \
--to=cpebenito@tresys.com \
--cc=refpolicy@oss.tresys.com \
/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.