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] main: test if valkey-server service can load a kernel module
Date: Thu, 26 Nov 2026 13:09:04 GMT	[thread overview]
Message-ID: <179569854481.1.1638119923240338738.tests-selinux-0c12d65e2ed4@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : main
            Commit : 0c12d65e2ed447b47779863bcb726caed4016f5a
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2026-11-26T13:06:43+00:00
            Stats  : +11/-1 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/0c12d65e2ed447b47779863bcb726caed4016f5a?branch=main

            Log:
            test if valkey-server service can load a kernel module

Recent internal valkey testing revealed that SELinux prevents the
valkey service from loading a kernel module. The TC reproduces
the situation.

In order to support the valkey-server functionality, I believe
that SELinux policy should allow this access. The TC looks for
appropriate policy rules and file context patterns.

The TC covers RHEL-255977 and RHEL-312617.

---
diff --git a/selinux-policy/valkey-and-similar/Makefile b/selinux-policy/valkey-and-similar/Makefile
index e194474..8bf2190 100644
--- a/selinux-policy/valkey-and-similar/Makefile
+++ b/selinux-policy/valkey-and-similar/Makefile
@@ -67,6 +67,8 @@ $(METADATA): Makefile
 	@echo "Bug:             RHEL-108982" >> $(METADATA) # RHEL-9
 	@echo "Bug:             RHEL-154814" >> $(METADATA) # RHEL-10
 	@echo "Bug:             RHEL-161115" >> $(METADATA) # RHEL-9
+	@echo "Bug:             RHEL-255977" >> $(METADATA) # RHEL-9
+	@echo "Bug:             RHEL-312617" >> $(METADATA) # RHEL-9
 
 	rhts-lint $(METADATA)
 

diff --git a/selinux-policy/valkey-and-similar/main.fmf b/selinux-policy/valkey-and-similar/main.fmf
index 6a1b18b..461786c 100644
--- a/selinux-policy/valkey-and-similar/main.fmf
+++ b/selinux-policy/valkey-and-similar/main.fmf
@@ -32,6 +32,8 @@ link:
   - verifies: https://issues.redhat.com/browse/RHEL-108982
   - verifies: https://issues.redhat.com/browse/RHEL-154814
   - verifies: https://issues.redhat.com/browse/RHEL-161115
+  - verifies: https://issues.redhat.com/browse/RHEL-255977
+  - verifies: https://issues.redhat.com/browse/RHEL-312617
 tag:
   - Tier3
   - Tier3se

diff --git a/selinux-policy/valkey-and-similar/runtest.sh b/selinux-policy/valkey-and-similar/runtest.sh
index 8b2830d..c0a7234 100755
--- a/selinux-policy/valkey-and-similar/runtest.sh
+++ b/selinux-policy/valkey-and-similar/runtest.sh
@@ -38,7 +38,7 @@ PROCESS_CONTEXT="redis_t"
 
 rlJournalStart
     rlPhaseStartSetup
-        rlRun "rlImport 'selinux-policy/common'"
+        rlRun "rlImport 'selinux-policy/common'" 0,1
         rlSESatisfyRequires
         rlAssertRpm ${PACKAGE}
         rlAssertRpm ${PACKAGE}-targeted
@@ -72,6 +72,12 @@ rlJournalStart
     rlPhaseEnd
     fi
 
+    if rlIsRHEL '>9.9' ; then
+    rlPhaseStartTest "RHEL-255977 + RHEL-312617"
+        rlSESearchRule "allow redis_t kernel_t : system { module_request } [ ]"
+    rlPhaseEnd
+    fi
+
     if [ -f /usr/lib/systemd/system/${SERVICE_NAME}.service ] ; then
     rlPhaseStartTest "real scenario -- ${SERVICE_NAME} service"
         if ! rlSEDefined ${PROCESS_CONTEXT} ; then

                 reply	other threads:[~2026-11-26 13:09 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=179569854481.1.1638119923240338738.tests-selinux-0c12d65e2ed4@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