public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if stress-ng can create anon_inode objects
@ 2026-09-11 13:21 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:21 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:21 [tests/selinux] pr775-checkpolicy-revdeps: test if stress-ng can create anon_inode objects Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox