Bug 1834773
| Summary: | SELinux prevents tcpdump from creating a RDMA socket (test failing with new tcpdump and libpcap) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Michal Ruprich <mruprich> | ||||
| Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 8.3 | CC: | lvrabec, mmalik, plautrba, ssekidde | ||||
| Target Milestone: | rc | Keywords: | AutoVerified, Triaged | ||||
| Target Release: | 8.3 | Flags: | pm-rhel:
mirror+
|
||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | No Doc Update | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2020-11-04 01:56:37 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1743650 | ||||||
| Attachments: |
|
||||||
|
Description
Michal Ruprich
2020-05-12 11:50:45 UTC
Michale, These are the allow rules required to be present in the policy: allow netutils_t self:netlink_rdma_socket create; allow staff_t self:netlink_netfilter_socket create; allow user_t self:netlink_netfilter_socket create; allow xguest_t self:netlink_netfilter_socket create; Note different SELinux users requested different socket types: For the netutils_t domain (unconfined_u and sysadm_u) it is netlink_rdma_socket, while for 3 other confined users it is netlink_netfilter_socket. Is it correct and expected as is or both of the socket types can be used? Milosi, Is it reasonable to test tcpdump in the dump mode for other users than unconfined_u and sysadm_u? Even staff_u seems to me to be questionable. I believe that the following rule should be part of SELinux policy: allow netutils_t self:netlink_rdma_socket create; I agree that following rules are questionable: allow staff_t self:netlink_netfilter_socket create; allow user_t self:netlink_netfilter_socket create; allow xguest_t self:netlink_netfilter_socket create; Clarified with Michal in the background, removing needinfo.
This is the current status in the policy:
# sesearch -A -s netutils_t -t netutils_t -c netlink_rdma_socket -p create
# sesearch -A -s netutils_t -t netutils_t -c netlink_netfilter_socket -p create
allow netutils_t netutils_t:netlink_netfilter_socket { append bind connect create getattr getopt ioctl lock read setattr setopt shutdown write };
There is a transition to netutils_t for unconfined_t and sysadm_t on netutils_exec_t. Given the comment in the test:
# based on agreement with developers, only unconfined_u and sysadm_u users can run tcpdump without limitations
we indeed need to add just this single rule.
I've submitted a Fedora PR to address the issue: https://github.com/fedora-selinux/selinux-policy/pull/354 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (selinux-policy bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4528 *** Bug 1844530 has been marked as a duplicate of this bug. *** |