media: usbtv: keep device alive while ALSA card exists
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 63ddf68de52efaac40a9287e44266ac30e71dd36 · < 7690a86b193271322cd31ab77349a87aa10858e4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: usbtv: keep device alive while ALSA card exists
The ALSA PCM callbacks store the driver state in pcm->private_data. An open PCM file can outlive USB disconnect because usbtv_audio_free() uses snd_card_free_when_closed(). The disconnect path can then drop the V4L2 device reference and free struct usbtv before ALSA releases the substream, so a later close dereferences freed memory in snd_usbtv_pcm_close().
Take a V4L2 device reference for the ALSA card and drop it from the card private_free callback. This keeps struct usbtv valid until ALSA has closed the remaining files and freed the card.
From the CVE record · Linux
The Linux kernel’s usbtv audio driver can free device state while an ALSA PCM file remains open. A local user closing that file after USB disconnect can trigger a use-after-free; the input does not specify an authentication requirement.
Engineers running Linux kernels with the usbtv driver should check whether their kernel includes the fix; affected versions were not specified.