Linux kernel concurrent DSP loads in ALSA hwdep
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: hwdep: Serialize DSP load requests
The check of the loaded DSP indices and the call of the driver's dsp_load callback in snd_hwdep_dsp_load() are not serialized. A hwdep file descriptor can be shared among threads, or inherited across fork, so two SNDRV_HWDEP_IOCTL_DSP_LOAD requests for the same index can both observe the index as unloaded and enter the driver's callback concurrently, even though the device itself is opened exclusively.
This breaks the assumption behind hw->dsp_loaded that a firmware index is loaded only once. For example, snd-usb-usx2y hits WARN_ON(usx2y->as04.buffer) in usx2y_async_seq04_init() and may allocate the US-428 sequence URBs twice.
Serialize the check, the callback invocation and the bookkeeping with a per-hwdep mutex, so that the second request returns -EBUSY.
From the CVE record · Linux
ALSA hwdep does not serialize DSP load requests for the same firmware index. Local threads sharing a hwdep file descriptor, or processes inheriting one across fork, can enter the driver's load callback concurrently, potentially triggering a warning and duplicate URB allocation. The device may be opened exclusively, but the requests must share its file descriptor.
Engineers running Linux kernels with ALSA hwdep should check whether their kernel includes the fix; affected versions were not provided.