Bug 2087101 - SELinux is preventing fprintd from read, write access on the chr_file 037.
Summary: SELinux is preventing fprintd from read, write access on the chr_file 037.
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 36
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nikola Knazekova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:003fd949f46b2c22a1cb68640fb...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-17 10:16 UTC by Kamil Páral
Modified: 2022-10-17 16:44 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-10-17 16:44:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kamil Páral 2022-05-17 10:16:14 UTC
Description of problem:
No idea why this happened.
SELinux is preventing fprintd from read, write access on the chr_file 037.

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

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

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

If you believe that fprintd should be allowed read write access on the 037 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                037 [ chr_file ]
Source                        fprintd
Source Path                   fprintd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-36.8-2.fc36.noarch
Local Policy RPM              selinux-policy-targeted-36.8-2.fc36.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.17.7-300.fc36.x86_64 #1 SMP
                              PREEMPT Thu May 12 14:56:44 UTC 2022 x86_64 x86_64
Alert Count                   1
First Seen                    2022-05-17 09:18:22 CEST
Last Seen                     2022-05-17 09:18:22 CEST
Local ID                      e58c4f04-c8e5-4541-b078-16dc2224777c

Raw Audit Messages
type=AVC msg=audit(1652771902.325:720): avc:  denied  { read write } for  pid=87514 comm="fprintd" name="037" dev="devtmpfs" ino=1487 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-36.8-2.fc36.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.17.1
hashmarkername: setroubleshoot
kernel:         5.17.7-300.fc36.x86_64
type:           libreport

Comment 1 Nikola Knazekova 2022-09-07 13:34:30 UTC
Hi, can you please reproduce it again with enabled full auditing?

Open /etc/audit/rules.d/audit.rules file in an editor.

 1. Remove following line if it exists:

-a task,never

 2. Add following line at the end of the file:

-w /etc/shadow -p w

 3. Restart the audit daemon:

 # service auditd restart

Thank you

Nikola

Comment 2 Kamil Páral 2022-09-07 14:09:35 UTC
Sorry, I don't know how to reproduce it. Looking into the logs, there are no AVC denials in the last week.

Comment 3 Nikola Knazekova 2022-10-17 16:44:11 UTC
I will close as insufficient data, but feel free to reopen it or create a new one and attach the needed information if the issue persists.


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