CVE-2026-138927: media: rtl28xxu: fix SDR platform device leak
In the Linux kernel, the following vulnerability has been resolved:
media: rtl28xxu: fix SDR platform device leak
rtl2832utunerattach() registers an rtl2832sdr platform device, but does not unregister it if no driver is bound. It also does not take a reference on the bound driver module.
Unregister the platform device when no driver is bound or the module reference cannot be acquired. Drop the module reference in rtl28xxutunerdetach() before unregistering the device.
The issue was identified by a static analysis tool I developed and confirmed by manual review.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In rtl28xxu_tuner_attach(), acquire a reference on the bound driver module; unregister the rtl2832_sdr platform device if no driver is bound or the module reference cannot be acquired. In rtl28xxu_tuner_detach(), drop the module reference before unregistering the device.