public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: kernel-confined-exec: refine policy expectations
Date: Fri, 11 Sep 2026 13:20:27 GMT [thread overview]
Message-ID: <178913282782.1.17978591849793652608.tests-selinux-ca2936720a77@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : ca2936720a77621e477b7223fb4efc3cf433097f
Author : Ondrej Mosnacek <omosnace@redhat.com>
Date : 2023-01-27T16:36:09+00:00
Stats : +8/-4 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/ca2936720a77621e477b7223fb4efc3cf433097f?branch=pr775-checkpolicy-revdeps
Log:
kernel-confined-exec: refine policy expectations
Don't be strict about the 'execute' permission and instead check for
[the lack of] transitions. Also drop entrypoint checking as it's not
really relevant.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
---
diff --git a/selinux-policy/kernel-confined-exec/runtest.sh b/selinux-policy/kernel-confined-exec/runtest.sh
index 35f0b58..1f59a75 100755
--- a/selinux-policy/kernel-confined-exec/runtest.sh
+++ b/selinux-policy/kernel-confined-exec/runtest.sh
@@ -39,12 +39,16 @@ rlJournalStart
rlPhaseStartTest "Policy rules"
rlLog "kernel_t shouldn't be allowed to execute any file without transition"
+ # Only check execute_no_trans and a couple of unexpected type
+ # transitions. Plain 'execute' has to be allowed broadly due to
+ # overlayfs mounter checks. (Think overlayfs mounted before policy
+ # is loaded.)
rlSESearchRule "allow kernel_t file_type:file { execute_no_trans } []" 1 \
"kernel_t shouldn't be allowed to execute any file without transition"
- rlSESearchRule "allow kernel_t user_home_t:file { execute entrypoint }" 1 \
- "kernel_t shouldn't be allowed to execute files in user home directories"
- rlSESearchRule "allow kernel_t user_tmp_t:file { execute entrypoint }" 1 \
- "kernel_t shouldn't be allowed to execute user temporary files"
+ rlSESearchRule "type_transition kernel_t user_home_t:process domain;" 1 \
+ "kernel_t shouldn't have any transition defined over files in user home directories"
+ rlSESearchRule "type_transition kernel_t user_tmp_t:process domain;" 1 \
+ "kernel_t shouldn't have any transition defined over user temporary files"
rlPhaseEnd
rlPhaseStartTest "Legit modprobe"
reply other threads:[~2026-09-11 13:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=178913282782.1.17978591849793652608.tests-selinux-ca2936720a77@fedoraproject.org \
--to=omosnace@redhat.com \
--cc=git-commits@fedoraproject.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox