media: go7007: defer the ALSA v4l2 put until card release
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d5d3a7cc127d096c22ad63c4ff72970e1beb22ef · < 0745a59945d927652d892437f9647ed6e87c0677| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: go7007: defer the ALSA v4l2 put until card release
go7007_snd_init() already takes a v4l2_device reference for the ALSA side, but go7007_snd_remove() drops it immediately after calling snd_card_free_when_closed().
That is too early when a userspace process still has the capture PCM open. The ALSA card and its PCM callbacks remain alive until the last file is closed, so the release path can still reach struct go7007 through pcm->private_data and call go7007_snd_hw_free() after the V4L2 release path has freed the object.
Move the matching v4l2_device_put() to the ALSA card private_free callback so the existing ALSA reference covers the whole deferred card lifetime.
From the CVE record · Linux
The Linux kernel’s go7007 ALSA code can release a V4L2 reference before an open capture PCM is closed. A local userspace process that still has the PCM open can reach a callback after the associated object has been freed, causing a use-after-free.
Engineers running Linux kernels with the go7007 media driver should check whether their kernel includes the fix; affected versions were not provided.