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 smbcontrol can read the /proc/net/unix file
Date: Fri, 11 Sep 2026 13:19:30 GMT [thread overview]
Message-ID: <178913277071.1.5801841851658929323.tests-selinux-9329983a575d@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 9329983a575d4176258195dd689e81baf24c086f
Author : Milos Malik <mmalik@redhat.com>
Date : 2022-01-06T10:51:50+01:00
Stats : +6/-0 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/9329983a575d4176258195dd689e81baf24c086f?branch=pr775-checkpolicy-revdeps
Log:
test if smbcontrol can read the /proc/net/unix file
Recent smbcontrol testing in certain environments revealed that
the smbcontrol process wants to read the /proc/net/unix file, but
SELinux denies that access. The TC reproduces the situation.
Not sure why the smbcontrol process wants to access the /proc/net/unix
file, but current SELinux policy allows a lot of SELinux domains to
read that file, which means that the behavior is pretty common.
The TC looks for appropriate allow rule.
The TC covers BZ#2033873.
---
diff --git a/selinux-policy/smbcontrol-and-similar/Makefile b/selinux-policy/smbcontrol-and-similar/Makefile
index 853e5b3..14bc31f 100644
--- a/selinux-policy/smbcontrol-and-similar/Makefile
+++ b/selinux-policy/smbcontrol-and-similar/Makefile
@@ -68,6 +68,7 @@ $(METADATA): Makefile
@echo "Bug: 2025931" >> $(METADATA) # Fedora 35
@echo "Bug: 2027740" >> $(METADATA) # RHEL-8
@echo "Bug: 2027751" >> $(METADATA) # RHEL-9
+ @echo "Bug: 2033873" >> $(METADATA) # RHEL-8
rhts-lint $(METADATA)
diff --git a/selinux-policy/smbcontrol-and-similar/runtest.sh b/selinux-policy/smbcontrol-and-similar/runtest.sh
index 864888f..1d618bc 100755
--- a/selinux-policy/smbcontrol-and-similar/runtest.sh
+++ b/selinux-policy/smbcontrol-and-similar/runtest.sh
@@ -91,6 +91,11 @@ rlJournalStart
rlSESearchRule "allow smbcontrol_t smbcontrol_t : netlink_route_socket { create bind getattr nlmsg_read} [ ]"
rlSESearchRule "allow smbcontrol_t smbcontrol_t : udp_socket { create ioctl } [ ]"
rlPhaseEnd
+
+ rlPhaseStartTest "bz#2033873"
+ rlSEMatchPathCon "/proc/net/unix" "proc_net_t"
+ rlSESearchRule "allow smbcontrol_t proc_net_t : file { getattr open read } [ ]"
+ rlPhaseEnd
fi
rlPhaseStartTest "real scenario"
reply other threads:[~2026-09-11 13:19 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=178913277071.1.5801841851658929323.tests-selinux-9329983a575d@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