Bug 1778079 - SELinux is preventing tpm2-abrmd from 'open' accesses on the chr_file /dev/tpm0.
Summary: SELinux is preventing tpm2-abrmd from 'open' accesses on the chr_file /dev/tpm0.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 31
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:03bd6356f1dd756ac6527de1fa2...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-29 09:10 UTC by Ankur Sinha (FranciscoD)
Modified: 2020-01-21 01:38 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.14.4-44.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-21 01:38:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ankur Sinha (FranciscoD) 2019-11-29 09:10:51 UTC
Description of problem:
SELinux is preventing tpm2-abrmd from 'open' accesses on the chr_file /dev/tpm0.

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

If you believe that tpm2-abrmd should be allowed open access on the tpm0 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 'tpm2-abrmd' --raw | audit2allow -M my-tpm2abrmd
# semodule -X 300 -i my-tpm2abrmd.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:tpm_device_t:s0
Target Objects                /dev/tpm0 [ chr_file ]
Source                        tpm2-abrmd
Source Path                   tpm2-abrmd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.4-42.fc31.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.3.12-300.fc31.x86_64 #1 SMP Thu
                              Nov 21 22:52:07 UTC 2019 x86_64 x86_64
Alert Count                   1
First Seen                    2019-11-29 09:09:20 GMT
Last Seen                     2019-11-29 09:09:20 GMT
Local ID                      2bae34ce-2a5e-4d70-8ab6-a96da56c2a95

Raw Audit Messages
type=AVC msg=audit(1575018560.434:27211): avc:  denied  { open } for  pid=1100116 comm="tpm2-abrmd" path="/dev/tpm0" dev="devtmpfs" ino=1170 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:tpm_device_t:s0 tclass=chr_file permissive=1


Hash: tpm2-abrmd,init_t,tpm_device_t,chr_file,open

Version-Release number of selected component:
selinux-policy-3.14.4-42.fc31.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.11.3
hashmarkername: setroubleshoot
kernel:         5.3.12-300.fc31.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2019-12-02 16:55:11 UTC
commit 43184d7cd6f8502f366b7db76bb8a4868c9a0b74 (HEAD -> rawhide)
Author: Lukas Vrabec <lvrabec>
Date:   Mon Dec 2 17:54:53 2019 +0100

    Allow systemd labeled as init_t do read/write tpm_device_t chr files BZ(1778079)

Comment 2 Fedora Update System 2020-01-14 01:43:33 UTC
selinux-policy-3.14.4-44.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-397eea28b7

Comment 3 Fedora Update System 2020-01-21 01:38:43 UTC
selinux-policy-3.14.4-44.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, 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.