Bug 637291 - /etc/asound.state created with incorrect selinux security context
Summary: /etc/asound.state created with incorrect selinux security context
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: alsa-utils
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jaroslav Kysela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-24 19:48 UTC by Steve Tyler
Modified: 2012-08-16 22:33 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-08-16 22:33:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve Tyler 2010-09-24 19:48:21 UTC
Description of problem:
"alsactl store" creates /etc/asound.state with the incorrect selinux security context.

Version-Release number of selected component (if applicable):
alsa-utils-1.0.23-3.fc14.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. # rm /etc/asound.state
2. # alsactl store
  
Actual results:
# ls -Z /etc/asound.*
-rw-r--r--. root root system_u:object_r:etc_t:s0       /etc/asound.conf
-rw-r--r--. root root unconfined_u:object_r:etc_t:s0   /etc/asound.state

Expected results:
# fixfiles check /etc/asound.*
/sbin/restorecon reset /etc/asound.state context unconfined_u:object_r:etc_t:s0->system_u:object_r:alsa_etc_rw_t:s0

Additional info:

Comment 1 Steve Tyler 2010-09-24 20:00:52 UTC
When selinux is in enforcing mode, this bug prevents the alsamixer settings from being saved. Setting selinux to permissive mode allows the alsamixer settings to be saved and restored.

Also, I can see an avc message about alsactl on the console during reboot, but I cannot find the message in any log file. I'm fairly sure this message was being logged when I encountered this problem in F13.

NB: I have removed pulseaudio.

Comment 2 Andre Robatino 2010-09-25 13:44:22 UTC
Confirmed that the problem also exists in Rawhide (alsa-utils-1.0.23-3.fc14), F13 (alsa-utils-1.0.23-3.fc13), and F12 (alsa-utils-1.0.23-3.fc12). I still have pulseaudio installed.

Comment 3 Steve Tyler 2010-09-26 18:17:05 UTC
(In reply to comment #2)
> Confirmed that the problem also exists in Rawhide (alsa-utils-1.0.23-3.fc14),
> F13 (alsa-utils-1.0.23-3.fc13), and F12 (alsa-utils-1.0.23-3.fc12). I still
> have pulseaudio installed.

Thanks for checking these.
Are you able to find any avc messages concerning alsactl in any log file?

Comment 4 Andre Robatino 2010-09-26 18:35:25 UTC
No, but as far as I can tell, initscripts only attempts to save mixer settings during shutdown, not restore them at boot. I haven't manually edited rc.local to do this, and filed bug 637551. Grepping /var/log/messages* for alsactl shows nothing in F13 (the only version where I've had an /etc/asound.state file before yesterday).

Comment 5 Steve Tyler 2010-09-26 20:28:31 UTC
(In reply to comment #4)
> No, but as far as I can tell, initscripts only attempts to save mixer settings
> during shutdown, not restore them at boot. I haven't manually edited rc.local
> to do this, and filed bug 637551. Grepping /var/log/messages* for alsactl shows
> nothing in F13 (the only version where I've had an /etc/asound.state file
> before yesterday).

OK. avcs can also appear in /var/log/dmesg and /var/log/audit/audit.log.

Comment 6 Andre Robatino 2010-09-26 20:33:17 UTC
Nothing for F13 in /var/log/dmesg* or /var/log/audit/audit.log*, either (grepping for alsactl).

Comment 7 Steve Tyler 2010-10-01 21:12:27 UTC
Dan, could you take a look at this one?
It seems to be easy to reproduce, anyway ... :-)

Comment 8 Daniel Walsh 2010-10-03 11:41:15 UTC
I am going to add a transition from unconfined_t to alsa_t which should correct the labeling.

Fixed in selinux-policy-3.9.5-9.fc14

Comment 9 Steve Tyler 2010-10-03 12:28:41 UTC
(In reply to comment #8)
> I am going to add a transition from unconfined_t to alsa_t which should correct
> the labeling.
> 
> Fixed in selinux-policy-3.9.5-9.fc14

Thanks, Dan.

Comment 10 Steve Tyler 2010-10-03 12:42:26 UTC
(In reply to comment #2)
> Confirmed that the problem also exists in Rawhide (alsa-utils-1.0.23-3.fc14),
> F13 (alsa-utils-1.0.23-3.fc13), and F12 (alsa-utils-1.0.23-3.fc12). I still
> have pulseaudio installed.

F13:
[root@walnut etc]# rm asound.state 
rm: remove regular file `asound.state'? y
[root@walnut etc]# alsactl store
[root@walnut etc]# ls -Z asound.state 
-rw-r--r--. root root unconfined_u:object_r:etc_t:s0   asound.state
[root@walnut etc]# rpm -qa 'selinux*' | sort
selinux-policy-3.7.19-57.fc13.noarch
selinux-policy-targeted-3.7.19-57.fc13.noarch
[root@walnut etc]#

Comment 11 Andre Robatino 2010-10-03 12:57:08 UTC
In F12 with updates-testing enabled, which is also currently broken, I have

selinux-policy-3.6.32-121.fc12.noarch
selinux-policy-targeted-3.6.32-121.fc12.noarch

Comment 12 Daniel Walsh 2010-10-04 15:46:29 UTC
Of course this would get  a lot easier to maintain if you used /etc/alsa/asound.*

Comment 13 Daniel Walsh 2010-10-04 15:46:56 UTC
Miroslav can you see about making this change in F12 and F13.

Comment 14 Fedora End Of Life 2012-08-16 22:33:08 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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