Bug 2252637 - SELinux is preventing gdk-pixbuf-thum from 'append' accesses on the unix_stream_socket unix_stream_socket.
Summary: SELinux is preventing gdk-pixbuf-thum from 'append' accesses on the unix_stre...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 38
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:33a4f956789de98501b1fc04280...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-03 09:55 UTC by Sam Tygier
Modified: 2024-01-03 02:18 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-38.31-1.fc38
Clone Of:
Environment:
Last Closed: 2024-01-03 02:18:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (2.02 KB, text/plain)
2023-12-03 09:55 UTC, Sam Tygier
no flags Details
File: os_info (709 bytes, text/plain)
2023-12-03 09:55 UTC, Sam Tygier
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1951 0 None open Allow thumb_t append to init unix domain stream sockets 2023-12-04 09:48:00 UTC

Description Sam Tygier 2023-12-03 09:55:05 UTC
Description of problem:
I think I get this when Caja is generating thumbnails.
SELinux is preventing gdk-pixbuf-thum from 'append' accesses on the unix_stream_socket unix_stream_socket.

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

If you believe that gdk-pixbuf-thum should be allowed append access on the unix_stream_socket unix_stream_socket 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 'gdk-pixbuf-thum' --raw | audit2allow -M my-gdkpixbufthum
# semodule -X 300 -i my-gdkpixbufthum.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023
Target Context                system_u:system_r:init_t:s0
Target Objects                unix_stream_socket [ unix_stream_socket ]
Source                        gdk-pixbuf-thum
Source Path                   gdk-pixbuf-thum
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.30-1.fc38.noarch
Local Policy RPM              selinux-policy-targeted-38.30-1.fc38.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.5.10-200.fc38.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Nov 2 19:59:55 UTC 2023 x86_64
Alert Count                   1205
First Seen                    2023-09-03 20:25:04 BST
Last Seen                     2023-12-01 21:33:40 GMT
Local ID                      2526417f-5014-4194-8db3-fb3499a890f1

Raw Audit Messages
type=AVC msg=audit(1701466420.881:575): avc:  denied  { append } for  pid=22070 comm="gdk-pixbuf-thum" path="socket:[25140]" dev="sockfs" ino=25140 scontext=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 tcontext=system_u:system_r:init_t:s0 tclass=unix_stream_socket permissive=0


Hash: gdk-pixbuf-thum,thumb_t,init_t,unix_stream_socket,append

Version-Release number of selected component:
selinux-policy-targeted-38.30-1.fc38.noarch

Additional info:
reporter:       libreport-2.17.11
package:        selinux-policy-targeted-38.30-1.fc38.noarch
component:      selinux-policy
type:           libreport
comment:        I think I get this when Caja is generating thumbnails.
kernel:         6.6.2-101.fc38.x86_64
reason:         SELinux is preventing gdk-pixbuf-thum from 'append' accesses on the unix_stream_socket unix_stream_socket.
hashmarkername: setroubleshoot
component:      selinux-policy

Comment 1 Sam Tygier 2023-12-03 09:55:08 UTC
Created attachment 2002710 [details]
File: description

Comment 2 Sam Tygier 2023-12-03 09:55:09 UTC
Created attachment 2002711 [details]
File: os_info

Comment 3 Zdenek Pytela 2023-12-04 09:48:01 UTC
Sam,

Can you check if the following module is sufficient ?


# cat local_thumb_init_socket.cil
(allow thumb_t init_t (unix_stream_socket (append)))

# semodule -i local_thumb_init_socket.cil

Comment 4 Sam Tygier 2023-12-04 13:21:37 UTC
Yes that resolves it. I can now rm ~/.cache/thumbnails/, restart caja and I get no alerts while it draws the thumbnails.

Comment 5 Zdenek Pytela 2023-12-04 13:34:37 UTC
Thank you, PR has already been created.

Comment 6 Fedora Update System 2023-12-18 14:01:35 UTC
FEDORA-2023-aeccf7b447 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-aeccf7b447

Comment 7 Fedora Update System 2023-12-19 01:42:17 UTC
FEDORA-2023-aeccf7b447 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-aeccf7b447`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-aeccf7b447

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2024-01-03 02:18:14 UTC
FEDORA-2023-aeccf7b447 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


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