public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if stress-ng can read+write+map /secretmem anon inodes
@ 2026-09-11 13:23 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:23 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 752ee72f5ab8a72cac9d3f2536806294eb187b96
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2025-11-13T08:16:15+00:00
            Stats  : +8/-0 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/752ee72f5ab8a72cac9d3f2536806294eb187b96?branch=pr775-checkpolicy-revdeps

            Log:
            test if stress-ng can read+write+map /secretmem anon inodes

Recently, a regular kernel + stress-ng testing revealed that SELinux
prevents the stress-ng program from writing (syscall = ftruncate)
and reading (syscall = mmap) the /secretmem anon inodes. The TC
reproduces the situation.

In order to enable various stress-ng functions, I believe that SELinux
policy should allow the actions mentioned above. The TC looks for
appropriate policy rules and file context patterns.

The TC covers RHEL-116154 and RHELTEST-2022.

---
diff --git a/selinux-policy/anon_inode-and-similar/Makefile b/selinux-policy/anon_inode-and-similar/Makefile
index 69a0f7f..80b8415 100644
--- a/selinux-policy/anon_inode-and-similar/Makefile
+++ b/selinux-policy/anon_inode-and-similar/Makefile
@@ -71,6 +71,8 @@ $(METADATA): Makefile
 	@echo "Bug:             RHEL-11792" >> $(METADATA) # RHEL-9
 	@echo "Bug:             2270895" >> $(METADATA) # Fedora 41
 	@echo "Bug:             RHEL-60837" >> $(METADATA) # RHEL-10
+	@echo "Bug:             RHEL-116154" >> $(METADATA) # RHEL-10
+	@echo "Bug:             RHELTEST-2022" >> $(METADATA) # RHEL-10
 
 	rhts-lint $(METADATA)
 

diff --git a/selinux-policy/anon_inode-and-similar/main.fmf b/selinux-policy/anon_inode-and-similar/main.fmf
index 08c5b28..7434a87 100644
--- a/selinux-policy/anon_inode-and-similar/main.fmf
+++ b/selinux-policy/anon_inode-and-similar/main.fmf
@@ -42,6 +42,8 @@ link:
   - verifies: https://issues.redhat.com/browse/RHEL-11792
   - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2270895
   - verifies: https://issues.redhat.com/browse/RHEL-60837
+  - verifies: https://issues.redhat.com/browse/RHEL-116154
+  - verifies: https://issues.redhat.com/browse/RHELTEST-2022
 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 8a506d3..0732ea1 100755
--- a/selinux-policy/anon_inode-and-similar/runtest.sh
+++ b/selinux-policy/anon_inode-and-similar/runtest.sh
@@ -107,6 +107,10 @@ rlJournalStart
         rlSESearchRule "type_transition sysadm_t sysadm_t : anon_inode secretmem_t [secretmem]"
         rlRun "stress-ng --resources 16 --timeout 5 --log-file /dev/null"
     rlPhaseEnd
+
+    rlPhaseStartTest "RHEL-116154 + RHELTEST-2022"
+        rlSESearchRule "allow unconfined_t secretmem_t : anon_inode { map read write } [ ]"
+    rlPhaseEnd
     fi
 
     rlPhaseStartCleanup

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 13:23 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:23 [tests/selinux] pr775-checkpolicy-revdeps: test if stress-ng can read+write+map /secretmem anon inodes Milos Malik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox