Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1540323 - SELinux is preventing acpid from 'read' accesses on the chr_file event30.
Summary: SELinux is preventing acpid from 'read' accesses on the chr_file event30.
Keywords:
Status: CLOSED DUPLICATE of bug 1547139
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:352b07c5c13d27464c46dc3d757...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-30 19:04 UTC by Raman Gupta
Modified: 2018-02-28 16:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-28 16:35:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Raman Gupta 2018-01-30 19:04:30 UTC
Description of problem:
SELinux is preventing acpid from 'read' accesses on the chr_file event30.

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

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

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

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

Additional Information:
Source Context                system_u:system_r:apmd_t:s0
Target Context                system_u:object_r:device_t:s0
Target Objects                event30 [ chr_file ]
Source                        acpid
Source Path                   acpid
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.21.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.14.13-300.fc27.x86_64 #1 SMP Thu
                              Jan 11 04:00:01 UTC 2018 x86_64 x86_64
Alert Count                   2
First Seen                    2018-01-30 14:03:30 EST
Last Seen                     2018-01-30 14:03:42 EST
Local ID                      d6253ed2-d3c7-49e6-b133-2d66ae6efbe4

Raw Audit Messages
type=AVC msg=audit(1517339022.755:41671): avc:  denied  { read } for  pid=1986 comm="acpid" name="event30" dev="devtmpfs" ino=604126073 scontext=system_u:system_r:apmd_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=0


Hash: acpid,apmd_t,device_t,chr_file,read

Version-Release number of selected component:
selinux-policy-3.13.1-283.21.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.14.13-300.fc27.x86_64
type:           libreport

Potential duplicate: bug 700614

Comment 1 Lukas Vrabec 2018-02-01 13:48:53 UTC
Hi, 

Could you please run:

#restorecon -Rv /dev/ 

To fix your issue? 

Thanks,
Lukas.

Comment 2 Raman Gupta 2018-02-01 18:04:50 UTC
(In reply to Lukas Vrabec from comment #1)
> Hi, 
> 
> Could you please run:
> 
> #restorecon -Rv /dev/ 

Hmm, why is the file in question (event30) not being relabeled? It seems as if this is not going to fix the problem...

# restorecon -Rv /dev/
Relabeled /dev/vboxusb/005/077 from system_u:object_r:device_t:s0 to system_u:object_r:xserver_misc_device_t:s0
Relabeled /dev/vboxusb/005/076 from system_u:object_r:device_t:s0 to system_u:object_r:xserver_misc_device_t:s0
Relabeled /dev/vboxusb/005/075 from system_u:object_r:device_t:s0 to system_u:object_r:xserver_misc_device_t:s0
Relabeled /dev/vboxusb/005/004 from system_u:object_r:usb_device_t:s0 to system_u:object_r:xserver_misc_device_t:s0
Relabeled /dev/vboxusb/005/009 from system_u:object_r:usb_device_t:s0 to system_u:object_r:xserver_misc_device_t:s0
Relabeled /dev/vboxusb/005/008 from system_u:object_r:usb_device_t:s0 to system_u:object_r:xserver_misc_device_t:s0
Relabeled /dev/vboxusb/005/002 from system_u:object_r:usb_device_t:s0 to system_u:object_r:xserver_misc_device_t:s0
Relabeled /dev/vboxusb/007/002 from system_u:object_r:usb_device_t:s0 to system_u:object_r:xserver_misc_device_t:s0
Relabeled /dev/vboxusb/001/003 from system_u:object_r:usb_device_t:s0 to system_u:object_r:xserver_misc_device_t:s0
Relabeled /dev/vboxusb/001/002 from system_u:object_r:usb_device_t:s0 to system_u:object_r:xserver_misc_device_t:s0

Comment 3 Raman Gupta 2018-02-09 05:32:32 UTC
Re-opening. This is still happening after running the recommended restorecon command.

Comment 4 Raman Gupta 2018-02-28 16:35:19 UTC

*** This bug has been marked as a duplicate of bug 1547139 ***


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