ALSA: bcd2000: Fix a UAF bug on the error path of probing
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b47a22290d581277be70e8a597824a4985d39e83 · < 64ca7f50ad96c2c65ae390b954925a36eabe04aa| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: bcd2000: Fix a UAF bug on the error path of probing
When the driver fails in snd_card_register() at probe time, it will free the 'bcd2k->midi_out_urb' before killing it, which may cause a UAF bug.
The following log can reveal it:
[ 50.727020] BUG: KASAN: use-after-free in bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000] [ 50.727623] Read of size 8 at addr ffff88810fab0e88 by task swapper/4/0 [ 50.729530] Call Trace: [ 50.732899] bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000]
Fix this by adding usb_kill_urb() before usb_free_urb().
From the CVE record · Linux
The Linux kernel’s ALSA bcd2000 driver can free a USB request before stopping it if snd_card_register() fails during device probing, causing a use-after-free. The input does not establish how an attacker could trigger the failure or whether authentication or user interaction is required.
Teams running Linux kernels with the ALSA bcd2000 driver should check their vendor’s advisory for affected versions.