Bug 2152002 - SELinux is preventing fprintd from read, write access on the chr_file 050.
Summary: SELinux is preventing fprintd from read, write access on the chr_file 050.
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 37
Hardware: x86_64
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:003fd949f46b2c22a1cb68640fb...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-08 20:29 UTC by Kamil Páral
Modified: 2023-07-14 21:43 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2087101 0 unspecified CLOSED SELinux is preventing fprintd from read, write access on the chr_file 037. 2022-12-09 08:52:49 UTC
Red Hat Bugzilla 2217872 0 low NEW USB device nodes are not always properly labeled with "usb_device_t" 2023-08-16 07:59:17 UTC

Description Kamil Páral 2022-12-08 20:29:58 UTC
Description of problem:
I resumed my laptop and logged in, that's all.
SELinux is preventing fprintd from read, write access on the chr_file 050.

*****  Plugin device (91.4 confidence) suggests   ****************************

If you want to allow fprintd to have read write access on the 050 chr_file
Then you need to change the label on 050 to a type of a similar device.
Do
# semanage fcontext -a -t SIMILAR_TYPE '050'
# restorecon -v '050'

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that fprintd should be allowed read write access on the 050 chr_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 'fprintd' --raw | audit2allow -M my-fprintd
# semodule -X 300 -i my-fprintd.pp

Additional Information:
Source Context                system_u:system_r:fprintd_t:s0
Target Context                system_u:object_r:device_t:s0
Target Objects                050 [ chr_file ]
Source                        fprintd
Source Path                   fprintd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-37.15-1.fc37.noarch
Local Policy RPM              selinux-policy-targeted-37.15-1.fc37.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.0.11-300.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Dec 2 20:47:45 UTC 2022 x86_64
                              x86_64
Alert Count                   1
First Seen                    2022-12-08 21:28:35 CET
Last Seen                     2022-12-08 21:28:35 CET
Local ID                      961be7c5-316f-42f8-8bc8-854bc8d002fd

Raw Audit Messages
type=AVC msg=audit(1670531315.15:658): avc:  denied  { read write } for  pid=157925 comm="fprintd" name="050" dev="devtmpfs" ino=2052 scontext=system_u:system_r:fprintd_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=0


Hash: fprintd,fprintd_t,device_t,chr_file,read,write

Version-Release number of selected component:
selinux-policy-targeted-37.15-1.fc37.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.17.4
hashmarkername: setroubleshoot
kernel:         6.0.11-300.fc37.x86_64
type:           libreport

Potential duplicate: bug 2087101

Comment 1 Zdenek Pytela 2022-12-09 08:52:49 UTC
This is a dup of bz#2087101.
Do you know how to reproduce it or when exactly this happens? Do you have any special settings for fprintd?

Comment 2 Kamil Páral 2022-12-09 13:28:44 UTC
No, I really don't know how to trigger it. I tried suspending and resuming a few more times, but the denial hasn't repeated, even after reboot. I don't have any custom configuration, I don't use the fingerprint reader, I haven't touched it at all since I installed the OS. Perhaps a race condition of sorts?

Comment 3 Zdenek Pytela 2023-07-14 21:43:38 UTC
Perhaps a related problem:
https://bugzilla.redhat.com/show_bug.cgi?id=2217872


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