CVE-2026-139672: media: ivsc: Fix csi_dev use-after-free in mei_ace_setup_dev_link()
In the Linux kernel, the following vulnerability has been resolved:
media: ivsc: Fix csidev use-after-free in meiacesetupdevlink()
devicelinkadd() only takes a reference to the supplier when the link is created successfully. When it fails it returns NULL without taking one, so the putdevice(csidev) before the error check can drop the last reference to csidev and devname(csidev) then dereferences a freed device.
Move the putdevice() below the error check and release the reference through the existing errput label on the failure path so that csidev is no longer touched after it has been put.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In mei_ace_setup_dev_link(), move put_device(csi_dev) below the error check and release the reference through the existing err_put label on the failure path, so csi_dev is not touched after it is put.