media: i2c: et8ek8: Don't strip remove function when driver is builtin
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c5254e72b8edc2ca0a98703e92e8c34959343d2c · < 904db2ba44ae60641b6378c5013254d09acf5e80| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: i2c: et8ek8: Don't strip remove function when driver is builtin
Using __exit for the remove function results in the remove callback being discarded with CONFIG_VIDEO_ET8EK8=y. When such a device gets unbound (e.g. using sysfs or hotplug), the driver is just removed without the cleanup being performed. This results in resource leaks. Fix it by compiling in the remove callback unconditionally.
This also fixes a W=1 modpost warning:
WARNING: modpost: drivers/media/i2c/et8ek8/et8ek8: section mismatch in reference: et8ek8_i2c_driver+0x10 (section: .data) -> et8ek8_remove (section: .exit.text)
From the CVE record · Linux
When the et8ek8 driver is built into the Linux kernel with CONFIG_VIDEO_ET8EK8=y, its remove callback is discarded. If the device is unbound through sysfs or hotplug, cleanup is skipped and resources leak. The input does not specify whether an attacker can trigger the unbind or what access it would require.
Engineers running Linux kernels with the et8ek8 driver built in using CONFIG_VIDEO_ET8EK8=y should check their systems; affected versions are not specified.