Bug 2411935

Summary: Nemo triggers SELinux alerts with write on io.systemd.DynamicUser when previewing images
Product: [Fedora] Fedora Reporter: Eric L. <ewl+redhat>
Component: bubblewrapAssignee: Colin Walters <walters>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 43CC: alexl, epel-packagers-sig, leigh123linux, mclasen, walters
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric L. 2025-11-03 07:15:23 UTC
As the subject says, since my upgrade to Fedora 43, opening Nemo in a folder with images triggers a storm of SElinux alerts.

Reproducible: Always

Steps to Reproduce:
1. open a folder with images in Nemo
Actual Results:
A storm of SELinux alerts, I count 1612 of them, in the ballpark of one per image previewed:

```
SELinux is preventing blocking-3 from write access on the sock_file io.systemd.DynamicUser.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that blocking-3 should be allowed write access on the io.systemd.DynamicUser sock_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'blocking-3' --raw | audit2allow -M my-blocking3
# semodule -X 300 -i my-blocking3.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023
Target Context                system_u:object_r:systemd_userdbd_runtime_t:s0
Target Objects                io.systemd.DynamicUser [ sock_file ]
Source                        blocking-3
Source Path                   blocking-3
Port                          <Unknown>
Host                          REDACTED
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-42.14-1.fc43.noarch
Local Policy RPM              selinux-policy-targeted-42.14-1.fc43.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     REDACTED
Platform                      Linux REDACTED 6.17.5-300.fc43.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Oct 23 15:35:13 UTC 2025
                              x86_64
Alert Count                   1612
First Seen                    2025-11-03 07:56:45 CET
Last Seen                     2025-11-03 08:08:52 CET
Local ID                      96888cb3-8bbe-4364-be19-aedf2b02c1c5

Raw Audit Messages
type=AVC msg=audit(1762153732.688:1856): avc:  denied  { write } for  pid=35571 comm="blocking-2" name="io.systemd.DynamicUser" dev="tmpfs" ino=1372 scontext=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_userdbd_runtime_t:s0 tclass=sock_file permissive=0


Hash: blocking-3,thumb_t,systemd_userdbd_runtime_t,sock_file,write
```

Expected Results:
No SE alerts. It didn't happen with Fedora 42.

Additional Information:
There are also 3 alerts at the same time cause by bwrap attempting sys_admin access but I don't know if it's related:

```
SELinux is preventing bwrap from sys_admin access on the cap_userns labeled thumb_t.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that bwrap should be allowed sys_admin access on cap_userns labeled thumb_t by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'bwrap' --raw | audit2allow -M my-bwrap
# semodule -X 300 -i my-bwrap.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023
Target Context                unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023
Target Objects                Unknown [ cap_userns ]
Source                        bwrap
Source Path                   bwrap
Port                          <Unknown>
Host                          REDACTED
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-42.14-1.fc43.noarch
Local Policy RPM              selinux-policy-targeted-42.14-1.fc43.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     REDACTED
Platform                      Linux REDACTED 6.17.5-300.fc43.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Oct 23 15:35:13 UTC 2025
                              x86_64
Alert Count                   3
First Seen                    2025-11-03 07:56:49 CET
Last Seen                     2025-11-03 07:56:52 CET
Local ID                      798943d3-739a-4c75-aea2-3b1d1ece8817

Raw Audit Messages
type=AVC msg=audit(1762153012.636:419): avc:  denied  { sys_admin } for  pid=7550 comm="bwrap" capability=21  scontext=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 tclass=cap_userns permissive=0


Hash: bwrap,thumb_t,thumb_t,cap_userns,sys_admin
```

Comment 1 leigh scott 2025-11-03 08:11:46 UTC
Why bug nemo with this thumbnailer issue?
Reassigning to bubblewrap