ALSA: pcm: oss: Fix setup list UAF on proc write error
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: pcm: oss: Fix setup list UAF on proc write error
snd_pcm_oss_proc_write() links a newly allocated setup entry into the OSS setup list before duplicating the task name. If the task-name allocation fails, the error path frees the already linked entry and leaves setup_list pointing at freed memory.
A later OSS device open can then walk the stale list entry in snd_pcm_oss_look_for_setup() and dereference freed memory.
Allocate the task name and initialize the setup entry before publishing the entry on setup_list. Also fetch the initial proc read iterator only after taking setup_mutex, so all setup_list traversal follows the same list lifetime rules.
From the CVE record · Linux
The Linux kernel’s ALSA PCM OSS proc write path can leave a freed setup entry in a list if task-name allocation fails. A later OSS device open can dereference that entry. The described trigger requires a proc write and a subsequent device open; the input does not specify authentication requirements.
Engineers running Linux kernels with ALSA PCM OSS should check their versions; affected versions are not specified.