CVE-2026-139792: ALSA: pcm: Prevent O_APPEND open on OSS streams
In the Linux kernel, the following vulnerability has been resolved:
ALSA: pcm: Prevent OAPPEND open on OSS streams
ALSA PCM core accepts to re-use the existing stream when OAPPEND is passed, and it's been used for dmix, etc. However, this mode isn't supposed to be used for OSS: the OSS stream allows re-configuration via its hwparams/hwrefine procedure even while it's being mmapped, so it implies the usage of only a single stream. Because of this assumption, the sanity check is skipped for OSS streams, and if user may attach to an existing OSS stream with OAPPEND, it may result in a UAF of the mapped pages which could be used as a privilege escalation exploit.
For addressing it, this patch simply prohibits the OAPPEND behavior on the OSS stream. OAPPEND is never used for OSS layer itself, so this can't break for the right applications.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Do not open OSS streams with O_APPEND.
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Systems exposing the Linux kernel's ALSA OSS PCM interface are affected when a user can interact with an existing OSS audio stream. The issue is relevant because the resulting use-after-free of mapped pages may be usable for privilege escalation.
What conditions are required for exploitation?
An attacker needs to attach to an existing OSS stream using O_APPEND while the stream can be reconfigured through the OSS hw_params or hw_refine path, including when it is memory-mapped. This can bypass the usual single-stream safety assumption and lead to use-after-free of mapped pages.
Does blocking O_APPEND on OSS streams risk breaking legitimate OSS applications?
The provided fix prohibits O_APPEND behavior specifically for OSS streams. According to the advisory, the OSS layer itself never uses O_APPEND, so correctly implemented applications should not be affected.