ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC
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 race at SNDCTL_DSP_SYNC
There is a small race window at snd_pcm_oss_sync() that is called from OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls snd_pcm_oss_make_ready() at first, then takes the params_lock mutex for the rest. When the stream is set up again by another thread between them, it leads to inconsistency, and may result in unexpected results such as NULL dereference of OSS buffer as a fuzzer spotted recently.
The fix is simply to cover snd_pcm_oss_make_ready() call into the same params_lock mutex with snd_pcm_oss_make_ready_locked() variant.
From the CVE record · Linux
A race in the Linux kernel’s ALSA OSS PCM SNDCTL_DSP_SYNC ioctl can occur when another thread reconfigures the stream. A local caller may trigger inconsistent state and unexpected results, including a NULL dereference of the OSS buffer; authentication requirements are not specified.
Engineers running Linux kernels with ALSA OSS PCM support should check whether their kernel includes the fix; affected versions are not specified.