No sound in Flash with aa-enabled firefox

Bug #1556603 reported by Jean-Philippe Guérard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppArmor
Confirmed
Low
Unassigned
apparmor (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

During the flash plugin initialization, flash tries to access "${HOME}/.asoundrc" if this file exists.
But access to this filed is blocked by AppArmor, which makes alsa initialization fail :

access("/etc/asound.conf", R_OK) = -1 ENOENT (No such file or directory)
access("/home/xxxxxxx/.asoundrc", R_OK) = 0
stat("/home/xxxxxxx/.asoundrc", {st_mode=S_IFREG|0664, st_size=86, ...}) = 0
open("/home/xxxxxxx/.asoundrc", O_RDONLY) = -1 EACCES (Permission denied)
write(2, "ALSA lib conf.c:3419:(config_fil"..., 40) = 40
write(2, "cannot access file /home/xxxxxxx"..., 42) = 42
write(2, "\n", 1) = 1
write(2, "ALSA lib conf.c:3339:(snd_config"..., 45) = 45
write(2, "function snd_config_hook_load re"..., 70) = 70
write(2, "\n", 1) = 1
write(2, "ALSA lib conf.c:3788:(snd_config"..., 43) = 43
write(2, "hooks failed, removing configura"..., 36) = 36
write(2, "\n", 1) = 1

Access to this file is authorized by "/etc/apparmor.d/abstractions/audio":

owner @{HOME}/.asoundrc r,

But denied by "/etc/apparmor.d/abstractions/private-files", which has priority:

deny @{HOME}/.*rc mrk,

"/etc/apparmor.d/firefox" calls "/etc/apparmor.d/abstractions/audio" directly.

"/etc/apparmor.d/firefox" calls "/etc/apparmor.d/abstractions/abstractions/ubuntu-browsers.d/firefox" which calls "/etc/apparmor.d/abstractions/abstractions/ubuntu-browsers.d/java" and "/etc/apparmor.d/abstractions/abstractions/ubuntu-browsers.d/user-files", both of which call "/etc/apparmor.d/abstractions/private-files".

Removing the "${HOME}/.asoundrc" reactivate sound in flash. But it's hard to guess.

Tags: aa-policy
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Thanks for the bug report and I'm sorry to hear that you're hitting this issue.

Unfortunately, I'm not sure how to solve it in policy without granting too much access so I'm going to leave this issue for the folks that are much better skilled at writing policy.

Changed in apparmor (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
tags: added: aa-policy
Changed in apparmor:
status: New → Confirmed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.