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 systemd-machined can open+ioctl /dev/vsock
Date: Fri, 11 Sep 2026 13:22:16 GMT [thread overview]
Message-ID: <178913293661.1.1958500801101042266.tests-selinux-1b8d7bd95f48@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 1b8d7bd95f48a4120ba7aacaf90afd58d33756d3
Author : Milos Malik <mmalik@redhat.com>
Date : 2025-01-22T07:14:13+00:00
Stats : +9/-0 in 3 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/1b8d7bd95f48a4120ba7aacaf90afd58d33756d3?branch=pr775-checkpolicy-revdeps
Log:
test if systemd-machined can open+ioctl /dev/vsock
Recent systemd-machined + selinux-policy testing revealed that
SELinux prevents the systemd-machined processes from accessing
the /dev/vsock device. The TC reproduces the situation.
In order to support the expected systemd-machined 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-74280.
---
diff --git a/selinux-policy/systemd-machined-and-similar/Makefile b/selinux-policy/systemd-machined-and-similar/Makefile
index cb3f07b..d34d9a0 100644
--- a/selinux-policy/systemd-machined-and-similar/Makefile
+++ b/selinux-policy/systemd-machined-and-similar/Makefile
@@ -67,6 +67,7 @@ $(METADATA): Makefile
@echo "Bug: 1900869" >> $(METADATA) # Fedora 33
@echo "Bug: 1900888" >> $(METADATA) # Fedora 35
@echo "Bug: RHEL-49567" >> $(METADATA) # RHEL-10
+ @echo "Bug: RHEL-74280" >> $(METADATA) # RHEL-10
rhts-lint $(METADATA)
diff --git a/selinux-policy/systemd-machined-and-similar/main.fmf b/selinux-policy/systemd-machined-and-similar/main.fmf
index 617fc5e..4dc0eb6 100644
--- a/selinux-policy/systemd-machined-and-similar/main.fmf
+++ b/selinux-policy/systemd-machined-and-similar/main.fmf
@@ -35,6 +35,7 @@ link:
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1900869
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1900888
- verifies: https://issues.redhat.com/browse/RHEL-49567
+ - verifies: https://issues.redhat.com/browse/RHEL-74280
adjust:
- enabled: false
when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-alt-7
diff --git a/selinux-policy/systemd-machined-and-similar/runtest.sh b/selinux-policy/systemd-machined-and-similar/runtest.sh
index 422908e..61fade7 100755
--- a/selinux-policy/systemd-machined-and-similar/runtest.sh
+++ b/selinux-policy/systemd-machined-and-similar/runtest.sh
@@ -104,6 +104,13 @@ rlJournalStart
rlRun "machinectl"
rlPhaseEnd
+ if rlIsRHEL 10 || rlIsCentOS 10 ; then
+ rlPhaseStartTest "RHEL-74280"
+ rlSEMatchPathCon "/dev/vsock" "vsock_device_t"
+ rlSESearchRule "allow systemd_machined_t vsock_device_t : chr_file { getattr open read ioctl } [ ]"
+ rlPhaseEnd
+ fi
+
rlPhaseStartTest "real scenario -- standalone service"
if ! rlSEDefined ${PROCESS_CONTEXT} ; then
PROCESS_CONTEXT="unconfined_service_t"
reply other threads:[~2026-09-11 13:22 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=178913293661.1.1958500801101042266.tests-selinux-1b8d7bd95f48@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