All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>, SE Linux <selinux@tycho.nsa.gov>
Subject: Random fork showing up in policy.
Date: Thu, 11 Feb 2010 08:37:24 -0500	[thread overview]
Message-ID: <4B740814.8080802@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]

There has got to be something I am doing wrong.  But on my blog someone asked about writing a program that does a fork and having SELinux block it.  

Where is the fork access coming from?

In the tmp dir I see this policy being compiled.

# grep process.*fork fork.tmp
	class process { fork transition sigchld sigkill sigstop signull signal ptrace getsched setsched getsession getpgid setpgid getcap setcap share getattr setexec setfscreate noatsecure siginh setrlimit rlimitinh dyntransition setcurrent execmem execstack execheap setkeycreate setsockcreate };
	type_transition initrc_t fork_exec_t:process fork_t;
	type_transition init_t fork_exec_t:process fork_t;
	type_transition unconfined_t fork_exec_t:process fork_t;
neverallow fork_t self:process fork;


But if I install.

# semodule -i fork.pp
libsepol.check_assertion_helper: neverallow violated by allow fork_t fork_t:process { fork };
libsemanage.semanage_expand_sandbox: Expand module failed
semodule:  Failed!

If I remove the neverallow line.

# sesearch -A -s fork_t -p fork
Found 1 semantic av rules:
   allow fork_t fork_t : process { fork sigchld } ; 

Something strange is going on.

[-- Attachment #2: fork.tgz --]
[-- Type: application/x-compressed-tar, Size: 1461 bytes --]

             reply	other threads:[~2010-02-11 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11 13:37 Daniel J Walsh [this message]
2010-02-12 13:07 ` Random fork showing up in policy Christopher J. PeBenito
2010-02-12 15:17   ` Daniel J Walsh
2010-02-12 16:01     ` {SPAM?} " Christopher J. PeBenito
2010-02-12 21:31       ` Daniel J Walsh
2010-02-16 14:19         ` 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=4B740814.8080802@redhat.com \
    --to=dwalsh@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.