public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Milos Malik <mmalik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: test if stress-ng can create anon_inode objects
Date: Fri, 11 Sep 2026 13:21:32 GMT [thread overview]
Message-ID: <178913289225.1.3793927018031047751.tests-selinux-af629f99a2da@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : af629f99a2daae826230b3a60d3f66160d1deba8
Author : Milos Malik <mmalik@redhat.com>
Date : 2024-03-27T15:30:28+01:00
Stats : +9/-1 in 3 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/af629f99a2daae826230b3a60d3f66160d1deba8?branch=pr775-checkpolicy-revdeps
Log:
test if stress-ng can create anon_inode objects
A recently filed Fedora bug revealed that SELinux prevents the
stress-ng processes from creating anon_inode objects via the
memfd_secret syscall. The TC reproduces the situation.
In order to support the expected stress-ng functonality, I believe
that SELinux policy should allow the action. The TC looks for
appropriate policy rules.
The TC covers BZ#2270895.
---
diff --git a/selinux-policy/anon_inode-and-similar/Makefile b/selinux-policy/anon_inode-and-similar/Makefile
index 0e381d6..e6d8ba8 100644
--- a/selinux-policy/anon_inode-and-similar/Makefile
+++ b/selinux-policy/anon_inode-and-similar/Makefile
@@ -54,7 +54,7 @@ $(METADATA): Makefile
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 30m" >> $(METADATA)
@echo "RunFor: selinux-policy" >> $(METADATA)
- @echo "Requires: libselinux policycoreutils selinux-policy selinux-policy-targeted gcc glibc-headers setools-console audit fio grubby" >> $(METADATA)
+ @echo "Requires: libselinux policycoreutils selinux-policy selinux-policy-targeted gcc glibc-headers setools-console audit fio grubby stress-ng" >> $(METADATA)
@echo "RhtsRequires: library(selinux-policy/common)" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@@ -68,6 +68,7 @@ $(METADATA): Makefile
@echo "Bug: 2025714" >> $(METADATA) # Fedora 35
@echo "Bug: 2187745" >> $(METADATA) # RHEL-9
@echo "Bug: RHEL-11792" >> $(METADATA) # RHEL-9
+ @echo "Bug: 2270895" >> $(METADATA) # Fedora 41
rhts-lint $(METADATA)
diff --git a/selinux-policy/anon_inode-and-similar/main.fmf b/selinux-policy/anon_inode-and-similar/main.fmf
index 755b0cd..6ef3a5d 100644
--- a/selinux-policy/anon_inode-and-similar/main.fmf
+++ b/selinux-policy/anon_inode-and-similar/main.fmf
@@ -17,6 +17,7 @@ recommend:
- audit
- fio
- grubby
+ - stress-ng
environment:
AVC_ERROR: +no_avc_check
duration: 30m
@@ -36,6 +37,7 @@ link:
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2025714
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2187745
- verifies: https://issues.redhat.com/browse/RHEL-11792
+ - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2270895
adjust:
- enabled: false
when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-8, centos-stream-8
diff --git a/selinux-policy/anon_inode-and-similar/runtest.sh b/selinux-policy/anon_inode-and-similar/runtest.sh
index 9359ba3..ea0818c 100755
--- a/selinux-policy/anon_inode-and-similar/runtest.sh
+++ b/selinux-policy/anon_inode-and-similar/runtest.sh
@@ -97,6 +97,11 @@ rlJournalStart
rlSESearchRule "allow unconfined_service_t unconfined_service_t : io_uring { cmd } [ ]"
rlPhaseEnd
+ rlPhaseStartTest "bz#2270895"
+ rlSESearchRule "allow unconfined_t unconfined_t : anon_inode { create } [ ]"
+ rlRun "stress-ng --resources 16 --timeout 5 --log-file /dev/null"
+ rlPhaseEnd
+
rlPhaseStartCleanup
sleep 2
rlSECheckAVC
reply other threads:[~2026-09-11 13:21 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=178913289225.1.3793927018031047751.tests-selinux-af629f99a2da@fedoraproject.org \
--to=mmalik@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