Bug 2218106 - SELinux prevents the bootupd process from searching the /boot/efi/EFI directory
Summary: SELinux prevents the bootupd process from searching the /boot/efi/EFI directory
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-28 07:34 UTC by Milos Malik
Modified: 2023-06-29 16:44 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-29 16:44:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1763 0 None open Allow bootupd search EFI directory 2023-06-28 09:19:00 UTC

Description Milos Malik 2023-06-28 07:34:01 UTC
selinux-policy-38.19-1.fc39.noarch
selinux-policy-targeted-38.19-1.fc39.noarch
bootupd-0.2.9-1.fc38.x86_64

Reproducible: Always

Steps to Reproduce:
1. get a Fedora rawhide machine
2. run the following automated test:
 * /CoreOS/selinux-policy/Regression/bootupd-and-similar
3. search for SELinux denials

Actual Results:  
----
type=PROCTITLE msg=audit(06/27/2023 19:22:31.060:6276) : proctitle=/usr/libexec/bootupd daemon -v 
type=PATH msg=audit(06/27/2023 19:22:31.060:6276) : item=0 name=/boot/efi inode=1 dev=103:03 mode=dir,700 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:dosfs_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(06/27/2023 19:22:31.060:6276) : cwd=/usr 
type=SYSCALL msg=audit(06/27/2023 19:22:31.060:6276) : arch=x86_64 syscall=statx success=yes exit=0 a0=0xffffff9c a1=0x7ffcd885d430 a2=0x0 a3=0xfff items=1 ppid=1 pid=134959 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=bootupd exe=/usr/libexec/bootupd subj=system_u:system_r:bootupd_t:s0 key=(null) 
type=AVC msg=audit(06/27/2023 19:22:31.060:6276) : avc:  denied  { getattr } for  pid=134959 comm=bootupd path=/boot/efi dev="nvme0n1p3" ino=1 scontext=system_u:system_r:bootupd_t:s0 tcontext=system_u:object_r:dosfs_t:s0 tclass=dir permissive=1 
----
type=PROCTITLE msg=audit(06/27/2023 19:22:31.060:6277) : proctitle=/usr/libexec/bootupd daemon -v 
type=PATH msg=audit(06/27/2023 19:22:31.060:6277) : item=0 name=/boot/efi/EFI inode=1048592 dev=103:03 mode=dir,700 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:dosfs_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(06/27/2023 19:22:31.060:6277) : cwd=/usr 
type=SYSCALL msg=audit(06/27/2023 19:22:31.060:6277) : arch=x86_64 syscall=openat success=yes exit=7 a0=0x6 a1=0x5602cecb1310 a2=O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH a3=0x0 items=1 ppid=1 pid=134959 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=bootupd exe=/usr/libexec/bootupd subj=system_u:system_r:bootupd_t:s0 key=(null) 
type=AVC msg=audit(06/27/2023 19:22:31.060:6277) : avc:  denied  { search } for  pid=134959 comm=bootupd name=/ dev="nvme0n1p3" ino=1 scontext=system_u:system_r:bootupd_t:s0 tcontext=system_u:object_r:dosfs_t:s0 tclass=dir permissive=1
----

Expected Results:  
no SELinux denials

Comment 1 Milos Malik 2023-06-28 16:35:51 UTC
Test coverage for this BZ exists in a form of PR:
 * https://src.fedoraproject.org/tests/selinux/pull-request/403

The PR waits for a review.


Note You need to log in before you can comment on or make changes to this bug.