ALSA: pcm: Fix potential data race at PCM memory allocation helpers
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d4cfb30fce03093ad944e0b44bd8f40bdad5330e · < bd55842ed998a622ba6611fe59b3358c9f76773d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: pcm: Fix potential data race at PCM memory allocation helpers
The PCM memory allocation helpers have a sanity check against too many buffer allocations. However, the check is performed without a proper lock and the allocation isn't serialized; this allows user to allocate more memories than predefined max size.
Practically seen, this isn't really a big problem, as it's more or less some "soft limit" as a sanity check, and it's not possible to allocate unlimitedly. But it's still better to address this for more consistent behavior.
The patch covers the size check in do_alloc_pages() with the card->memory_mutex, and increases the allocated size there for preventing the further overflow. When the actual allocation fails, the size is decreased accordingly.
From the CVE record · Linux
A data race in the Linux kernel's ALSA PCM memory allocation helpers can let a local user allocate more memory than the predefined maximum. The limit is a sanity check, and the issue does not allow unlimited allocation; authentication requirements are not specified.
Anyone running the Linux kernel should check whether their version includes the ALSA PCM fix; affected versions are not specified.