Bug 632090

Summary: SELinux is preventing /sbin/hdparm "read" to /var/run/pm-utils/locks/pm-suspend.lock.
Product: [Fedora] Fedora Reporter: Matěj Cepl <mcepl>
Component: pm-utilsAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: jskala, jskarvad, mcepl, mgrepl, opensource, pknirsch, rhughes
Target Milestone: ---Keywords: SELinux
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-09 11:19:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matěj Cepl 2010-09-09 06:57:06 UTC
SELinux denied hdparm access to /var/run/pm-utils/locks/pm-suspend.lock. If this
is a swapfile it has to have a file context label of swapfile_t. If you did not
intend to use /var/run/pm-utils/locks/pm-suspend.lock as a swapfile it probably
indicates a bug, however it could also signal a intrusion attempt.

Povolení přístupu:

You can alter the file context by executing chcon -t swapfile_t
'/var/run/pm-utils/locks/pm-suspend.lock' You must also change the default file
context files on the system in order to preserve them even on a full relabel.
"semanage fcontext -a -t swapfile_t '/var/run/pm-utils/locks/pm-suspend.lock'"

Příkaz pro opravu:

chcon -t swapfile_t '/var/run/pm-utils/locks/pm-suspend.lock'

Další informace:

Kontext zdroje                system_u:system_r:fsadm_t:s0
Kontext cíle                  system_u:object_r:hald_var_run_t:s0
Objekty cíle                  /var/run/pm-utils/locks/pm-suspend.lock [ file ]
Zdroj                         hdparm
Cesta zdroje                  /sbin/hdparm
Port                          <Neznámé>
Počítač                       jakoubek.ceplovi.cz
RPM balíčky zdroje            hdparm-9.27-1.fc13
RPM balíčky cíle              
RPM politiky                  selinux-policy-3.9.2-1.fc14
Selinux povolen               True
Typ politiky                  targeted
Vynucovací režim              Enforcing
Název zásuvného modulu        swapfile
Název počítače                jakoubek.ceplovi.cz
Platforma                     Linux jakoubek.ceplovi.cz 2.6.35.4-12.fc14.x86_64
                              #1 SMP Fri Aug 27 07:45:05 UTC 2010 x86_64 x86_64
Počet upozornění              1
Poprvé viděno                 Čt 9. září 2010, 07:42:53 CEST
Naposledy viděno              Čt 9. září 2010, 07:42:53 CEST
Místní ID                     201addbd-53f2-47eb-a5b2-5b99919a011d
Čísla řádků                   

Původní zprávy auditu         

node=jakoubek.ceplovi.cz type=AVC msg=audit(1284010973.433:11545): avc:  denied  { read } for  pid=21954 comm="hdparm" path="/var/run/pm-utils/locks/pm-suspend.lock" dev=dm-0 ino=10622 scontext=system_u:system_r:fsadm_t:s0 tcontext=system_u:object_r:hald_var_run_t:s0 tclass=file

node=jakoubek.ceplovi.cz type=SYSCALL msg=audit(1284010973.433:11545): arch=c000003e syscall=59 success=yes exit=0 a0=1f53c20 a1=1f54070 a2=1f558d0 a3=20 items=0 ppid=21953 pid=21954 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="hdparm" exe="/sbin/hdparm" subj=system_u:system_r:fsadm_t:s0 key=(null)

Comment 1 Miroslav Grepl 2010-09-09 11:19:19 UTC

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