Bug 1869028
| Summary: | units with private mount namespaces (like cockpit.service) fail with exfat volume mounted: avc: denied { remount } | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jason Montleon <jmontleo> |
| Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 32 | CC: | dperpeet, dwalsh, grepl.miroslav, ichavero, lvrabec, mmalik, mpitt, plautrba, pvolpe, stefw, vmojzis, zpytela |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-09-09 07:18:15 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: | |||
|
Description
Jason Montleon
2020-08-15 15:41:29 UTC
selinux denials:
type=AVC msg=audit(1597504784.924:3423): avc: denied { remount } for pid=7794 comm="(kpit-tls)" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=filesystem permissive=0
# audit2allow -m cockpit-custom < cockpit-custom.log
module cockpit-custom 1.0;
require {
type unlabeled_t;
type init_t;
class filesystem remount;
}
#============= init_t ==============
allow init_t unlabeled_t:filesystem remount;
I can reproduce this perfectly well, thanks for the report! Reproducer for creating exfat volume: dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-32.noarch.rpm dnf install -y exfat-utils modprobe scsi_debug dev_size_mb=100 mkfs.exfat /dev/sda # make TRIPLE SURE that this is the scsi_debug disk, not a real one! Then, mount /dev/sda /mnt systemctl start cockpit reproduces the bug. This already happens in systemd, as it tries to set up a private mount namespace due to ProtectSystem=strict ProtectHome=true PrivateTmp=true PrivateDevices=true This is a legitimate operation in systemd, so it should be supported in the SELinux policy. selinux-policy-3.14.5-43.fc32.noarch systemd-245.7-1.fc32.x86_64 *** This bug has been marked as a duplicate of bug 1874836 *** |