Bug 614078 - SELinux verhindert /sbin/hdparm "ioctl" Zugriff on /dev/sda.
SELinux verhindert /sbin/hdparm "ioctl" Zugriff on /dev/sda.
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
12
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:44d36088048...
:
: 614077 614080 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-13 12:07 EDT by Till Maas
Modified: 2010-08-19 21:44 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.6.32-120.fc12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-19 21:44:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Till Maas 2010-07-13 12:07:20 EDT
Zusammenfassung:

SELinux verhindert /sbin/hdparm "ioctl" Zugriff on /dev/sda.

Detaillierte Beschreibung:

[SELinux ist in freizügigem Modus. Dieser Zugriff wurde nicht verweigert.]

SELinux verweigerte den von hdparm angeforderten Zugriff. Da nicht davon
ausgegangen wird, dass dieser Zugriff von hdparm benötigt wird, signalisiert
dies möglicherweise einen Einbruchsversuch. Es ist ausserdem möglich, dass
diese spezielle Version oder Konfiguration der Anwendung den zusätzlichen
Zugriff verursacht.

Zugriff erlauben:

Sie können ein lokales Richtlininenmodul generieren, um diesen Zugriff zu
erlauben siehe FAQ (http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385)
Bitte reichen Sie einen Fehlerbericht ein.

Zusätzliche Informationen:

Quellkontext                  system_u:system_r:munin_disk_plugin_t:s0
Zielkontext                   system_u:object_r:fixed_disk_device_t:s0
Zielobjekte                   /dev/sda [ blk_file ]
Quelle                        hdparm
Quellpfad                     /sbin/hdparm
Port                          <Unbekannt>
Host                          (entfernt)
RPM-Pakete der Quelle         hdparm-9.16-3.fc12
RPM-Pakete des Ziels          
Richtlinien-RPM               selinux-policy-3.6.32-118.fc12
SELinux aktiviert             True
Richtlinientyp                targeted
Enforcing-Modus               Permissive
Plugin-Name                   catchall
Rechnername                   (entfernt)
Plattform                     Linux (entfernt)
                              2.6.32.14-127.fc12.x86_64 #1 SMP Fri May 28
                              04:30:39 UTC 2010 x86_64 x86_64
Anzahl der Alarme             21033
Zuerst gesehen                Do 06 Mai 2010 19:15:20 CEST
Zuletzt gesehen               Di 13 Jul 2010 18:05:10 CEST
Lokale ID                     2e5d7f83-0185-45ec-82af-08c153c8a583
Zeilennummern                 

Raw-Audit-Meldungen           

node=(entfernt) type=AVC msg=audit(1279037110.568:1840): avc:  denied  { ioctl } for  pid=28033 comm="hdparm" path="/dev/sda" dev=devtmpfs ino=5229 scontext=system_u:system_r:munin_disk_plugin_t:s0 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file

node=(entfernt) type=AVC msg=audit(1279037110.568:1840): avc:  denied  { sys_rawio } for  pid=28033 comm="hdparm" capability=17  scontext=system_u:system_r:munin_disk_plugin_t:s0 tcontext=system_u:system_r:munin_disk_plugin_t:s0 tclass=capability

node=(entfernt) type=SYSCALL msg=audit(1279037110.568:1840): arch=c000003e syscall=16 success=yes exit=0 a0=3 a1=2285 a2=7fffc7741af0 a3=0 items=0 ppid=28032 pid=28033 auid=4294967295 uid=0 gid=470 euid=0 suid=0 fsuid=0 egid=470 sgid=470 fsgid=470 tty=(none) ses=4294967295 comm="hdparm" exe="/sbin/hdparm" subj=system_u:system_r:munin_disk_plugin_t:s0 key=(null)



Hash String generated from  catchall,hdparm,munin_disk_plugin_t,fixed_disk_device_t,blk_file,ioctl
audit2allow suggests:

#============= munin_disk_plugin_t ==============
allow munin_disk_plugin_t fixed_disk_device_t:blk_file ioctl;
allow munin_disk_plugin_t self:capability sys_rawio;
Comment 1 Daniel Walsh 2010-07-13 14:26:36 EDT
allow munin_disk_plugin_t fixed_disk_device_t:blk_file ioctl;

Is this domain going to have to read all disks?
Comment 2 Till Maas 2010-07-13 14:45:05 EDT
(In reply to comment #1)
> allow munin_disk_plugin_t fixed_disk_device_t:blk_file ioctl;
> 
> Is this domain going to have to read all disks?    

I would say yes, but I have multiple disks and the system that creates this message only for sda.
Comment 3 Miroslav Grepl 2010-07-14 03:29:53 EDT
We define for nagios disk plugins

# needed by ioctl()
allow nagios_checkdisk_plugin_t self:capability { sys_admin sys_rawio };

storage_raw_read_fixed_disk(nagios_checkdisk_plugin_t)


Let's add it for munin disk plugins.
Comment 4 Miroslav Grepl 2010-07-14 03:30:20 EDT
*** Bug 614080 has been marked as a duplicate of this bug. ***
Comment 5 Miroslav Grepl 2010-07-14 03:31:01 EDT
*** Bug 614077 has been marked as a duplicate of this bug. ***
Comment 6 Miroslav Grepl 2010-08-05 07:48:04 EDT
Fixed in selinux-policy-3.6.32-120.fc12
Comment 7 Fedora Update System 2010-08-05 09:19:05 EDT
selinux-policy-3.6.32-120.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-120.fc12
Comment 8 Fedora Update System 2010-08-05 19:23:10 EDT
selinux-policy-3.6.32-120.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-120.fc12
Comment 9 Fedora Update System 2010-08-19 21:39:25 EDT
selinux-policy-3.6.32-120.fc12 has been pushed to the Fedora 12 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.