CVE-2026-139040: media: vidtv: fix frontend reference leak on unbind
In the Linux kernel, the following vulnerability has been resolved:
media: vidtv: fix frontend reference leak on unbind
dvbregisterfrontend() keeps two references to the frontend. One is released by dvbunregisterfrontend(), and the other by dvbfrontenddetach(). vidtv only called dvbunregisterfrontend(), so the second reference was never released. As a result, dvbfrontendfree() was never called, leaking the frontend private data and its struct dvbdevice.
The detach call was removed by commit 63101b756893 ("media: vidtv: fix driver unbind/remove") because it caused an OOPS. The demod .release callback freed vidtvdemodstate, and the I2C remove callbacks then accessed the freed state.
That commit also removed those accesses from the I2C remove callbacks. Restore the detach call, but remove the demod .release callback. vidtvdemodstate is owned by the I2C client and is already freed by vidtvdemodi2cremove(), so the frontend detach path should not free it.
Tested with kmemleak and KASAN over 10 bind/unbind cycles. The reported frontend and dvbdevice leaks were present before the fix and were gone after it, with no KASAN reports.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In vidtv, restore the dvb_frontend_detach() call and remove the demod .release callback; vidtv_demod_state is owned and freed by the I2C client, so the detach path must not free it.