Apps using OpenAL on the Ubuntu Phone appear to have direct hardware access despite apparmor constraints
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | apparmor (Ubuntu) |
Undecided
|
Unassigned | ||
Bug Description
I have been building some apps for the phone which use OpenAL. They will play audio if running under the "audio" policy group. However, the volume of audio is not controlled by the volume slider or "Silent mode" switch and audio can continue to play if the app is backgrounded or phone screen is switched off. After discussion on #ubuntu-touch it was suggested this may imply the apps have direct hardware access, despite apparmor constraints.
I do not know if this is a security vulnerability, so I will report it as such to be safe.
Attached is a .click package build for Ubuntu phones (armhf). It contains a small OpenAL example app borrowed from a blog site (source code included in click) and bundles the current OpenAL lib from the 14.10 distribution. It runs under apparmor constraints, and is only granted access to the "audio" group. The app would be automatically accepted to the Ubuntu Store.
The audio will continue to play until the app is killed by the user. It will play in silent mode, when in the background or when the screen is off. The app has been tested on BQ and meizu devices running RTM and vivid.
| Changed in apparmor (Ubuntu): | |
| status: | New → Confirmed |
| Jamie Strandboge (jdstrand) wrote : | #3 |
Apps currently have access to pulseaudio and should not have direct hardware access for sound-- does OpenAL use pulseaudio?
| Changed in apparmor (Ubuntu): | |
| status: | Confirmed → Incomplete |
| Neil McPhail (njmcphail) wrote : | #4 |
As far as I know, it _can_ use pulseaudio but don't know if that is what is happening here. I had been told on the IRC channel that the reason it was not responding to the volume control was because it was not using pulse, and suggested it was directly accessing the hardware. I have no idea how to confirm that but am happy to do any suggested debugging.
| Louis M (tioui) wrote : | #5 |
Hi, I don't know if that can be of any help, but I enable trace in the openal library on the ubuntu touch to see what is going on and here is the output (attachment). It look like OpenAL IS using Pulse, but the system audio control still does not work.
| Neil McPhail (njmcphail) wrote : | #6 |
Thanks for the log - if pulse is being used, there must be some reason the volume control doesn't work.
I have realised the reason the sound continues playing in the background is due to an unrelated bug: apps continue running in background (or screen-off) when they do not spawn a gui. Thus, this bug is probably assigned to the wrong package. Can anyone suggest or reassign to a more appropriate package?
| Launchpad Janitor (janitor) wrote : | #7 |
[Expired for apparmor (Ubuntu) because there has been no activity for 60 days.]
| Changed in apparmor (Ubuntu): | |
| status: | Incomplete → Expired |


Confirmed that the audio carries on even when another app is open over the top on latest arale vivid image.