Bug 614078 - SELinux verhindert /sbin/hdparm "ioctl" Zugriff on /dev/sda.
Summary: SELinux verhindert /sbin/hdparm "ioctl" Zugriff on /dev/sda.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:44d36088048...
: 614077 614080 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-13 16:07 UTC by Till Maas
Modified: 2010-08-20 01:44 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.6.32-120.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-20 01:44:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Till Maas 2010-07-13 16:07:20 UTC
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 18:26:36 UTC
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 18:45:05 UTC
(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 07:29:53 UTC
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 07:30:20 UTC
*** Bug 614080 has been marked as a duplicate of this bug. ***

Comment 5 Miroslav Grepl 2010-07-14 07:31:01 UTC
*** Bug 614077 has been marked as a duplicate of this bug. ***

Comment 6 Miroslav Grepl 2010-08-05 11:48:04 UTC
Fixed in selinux-policy-3.6.32-120.fc12

Comment 7 Fedora Update System 2010-08-05 13:19:05 UTC
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 23:23:10 UTC
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-20 01:39:25 UTC
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.