CVE-2026-139283

ALSA: oss: Keep emulation modules loaded until object teardown

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ALSA: oss: Keep emulation modules loaded until object teardown

OSS proc entries and notifier callbacks can remain in use without an
open OSS device file. Normal snd-pcm-oss removal can therefore delete
an existing PCM's OSS proc entry while late HDA codec binding repeats
snd_card_register() on the same live card:

OSS PCM module unload Card registration
--------------------- -----------------
snd_info_free_entry(entry)
proc_remove(entry->p)
clear entry->p
snd_info_card_register()
republish linked entry
unlink and free entry

The new proc node retains a pointer to freed storage. Mixer OSS removal
can likewise release an adapter while a card notification still uses it.

Hold a snd-pcm-oss module reference for each PCM registered with its
notifier and a snd-mixer-oss reference for each card adapter. Release
them at final unregister or FREE, after proc and adapter cleanup. Normal
module unload can no longer initiate removal while these objects exist.

Track PCM OSS registration with a separate bool registered. Unlike
oss.reg, this state also covers unmapped PCMs and remains set across
DISCONNECT until final unregister. BUILD-state and creation-error cleanup
must not drop a reference when registration never acquired one. The PCM
notifier's register_mutex serialization keeps the final put ahead of
notifier removal and module teardown until dispatch has finished.

For mixer OSS, serialize callback publication, dispatch and withdrawal
in the core so module exit waits for callbacks, including one dropping
the last reference, to return. Keep card enumeration in the OSS module,
with card references released after dispatch drops the mutex. Ignore
duplicate REGISTER notifications so a delayed registration cannot
replace an adapter retained across DISCONNECT and leak its module pin.

Partial HDA codec teardown can still remove an individual PCM while the
card remains registered; its object-lifetime handling is separate.

Analysis

AI-generated

Technical impact

The flaw occurs in the ALSA OSS subsystem when a PCM or mixer module unloads while its proc entry or notifier callback remains in use. The module removes a proc node that points to freed storage, and later registration attempts create a new entry that reuses the same pointer. This use‑after‑free can corrupt kernel memory and potentially allow an attacker with the ability to unload or manipulate ALSA modules to execute code or crash the system. The weakness is a classic use‑after‑free (CWE‑416).

Affected Systems

All Linux kernel releases that include the ALSA OSS emulation modules were affected before the patch was applied. The vulnerability is documented as implemented in the Linux kernel code base; the resolution was made in a series of kernel commits and applies to any downstream distribution that bundles the original ALSA OSS module without the patch. The known vendors listed are simply Linux kernel maintainers: Linux:Linux. No specific version numbers are listed in the patch notes, so any kernel earlier than the commit sequence that introduced the fix is considered vulnerable.

Risk and Exploitability

No EPSS score is available for this vulnerability and it is not listed in the CISA KEV catalog. The flaw requires the ability to unload or reload ALSA OSS modules, a capability usually limited to local users with root privileges or users with CAP_SYS_MODULE. Consequently, the risk is largely local; remote exploitation would need a foothold that can elevate to module control. The CVSS score is not published, but the described use‑after‑free could lead to arbitrary code execution or denial of service under the right conditions.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update to a Linux kernel version that includes the ALSA OSS patch (earlier commits 35ff4b2e, 59800843, 5d69fbf3, etc.), ensuring the reference‑counting fixes are in place.
  • If the ALSA OSS subsystem is not required, disable or remove the oss module from the kernel configuration or runtime configuration to eliminate the code path that can be exploited.
  • Monitor system logs for errors related to ALSA module unload or proc entry handling (e.g., dmesg for "module unloading" or "proc" messages) and investigate any anomalies promptly.

Generated by OpenCVE AI on November 30, 2026 at 21:10 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ALSA: oss: Keep emulation modules loaded until object teardown OSS proc entries and notifier callbacks can remain in use without an open OSS device file. Normal snd-pcm-oss removal can therefore delete an existing PCM's OSS proc entry while late HDA codec binding repeats snd_card_register() on the same live card: OSS PCM module unload Card registration --------------------- ----------------- snd_info_free_entry(entry) proc_remove(entry->p) clear entry->p snd_info_card_register() republish linked entry unlink and free entry The new proc node retains a pointer to freed storage. Mixer OSS removal can likewise release an adapter while a card notification still uses it. Hold a snd-pcm-oss module reference for each PCM registered with its notifier and a snd-mixer-oss reference for each card adapter. Release them at final unregister or FREE, after proc and adapter cleanup. Normal module unload can no longer initiate removal while these objects exist. Track PCM OSS registration with a separate bool registered. Unlike oss.reg, this state also covers unmapped PCMs and remains set across DISCONNECT until final unregister. BUILD-state and creation-error cleanup must not drop a reference when registration never acquired one. The PCM notifier's register_mutex serialization keeps the final put ahead of notifier removal and module teardown until dispatch has finished. For mixer OSS, serialize callback publication, dispatch and withdrawal in the core so module exit waits for callbacks, including one dropping the last reference, to return. Keep card enumeration in the OSS module, with card references released after dispatch drops the mutex. Ignore duplicate REGISTER notifications so a delayed registration cannot replace an adapter retained across DISCONNECT and leak its module pin. Partial HDA codec teardown can still remove an individual PCM while the card remains registered; its object-lifetime handling is separate.
Title ALSA: oss: Keep emulation modules loaded until object teardown
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:33 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM