mfd: sm501: Fix reference leak on failed device registration
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel e2dac91380a10e9e8d5883fb73ce9d9b390a629c, Kernel 0baf9d43a7b7b43df2900bd8656e75b725028b6e, Kernel 16a42c88c4667fa0bd944e438a667e059551f1f1 and 12 more.
In the Linux kernel, the following vulnerability has been resolved: mfd: sm501: Fix reference leak on failed device registration When platform_device_register() fails in sm501_register_device(), the embedded struct device in pdev has already been initialized by device_initialize(), but the failure path only reports the error and returns without dropping the device reference for the current platform device: sm501_register_device() -> platform_device_register(pdev) -> device_initialize(&pdev->dev) -> setup_pdev_dma_masks(pdev) -> platform_device_add(pdev) This leads to a reference leak when platform_device_register() fails. Fix this by calling platform_device_put() before returning the error. The issue was identified by a static analysis tool I developed and confirmed by manual review.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=b6d6454fdb66f3829af8b92ab06825b6060fdf7e <e2dac91380a10e9e8d5883fb73ce9d9b390a629c, >=b6d6454fdb66f3829af8b92ab06825b6060fdf7e <0baf9d43a7b7b43df2900bd8656e75b725028b6e, >=b6d6454fdb66f3829af8b92ab06825b6060fdf7e <16a42c88c4667fa0bd944e438a667e059551f1f1, >=b6d6454fdb66f3829af8b92ab06825b6060fdf7e <2ff8156fd500d54c61430b6834137fd0a07047ce, >=b6d6454fdb66f3829af8b92ab06825b6060fdf7e <760a1029692f1d788dc11aa636a3bf432e58b240, >=b6d6454fdb66f3829af8b92ab06825b6060fdf7e <8c2f0b42fc252e1bf1c7746447091a468e784ca1, >=b6d6454fdb66f3829af8b92ab06825b6060fdf7e <a3e340d506c1036a747fb0972aebf1063f7ef30e, >=b6d6454fdb66f3829af8b92ab06825b6060fdf7e <bbb1ecaed4ed7680e63d3a0f143f03de32de5d6e, =2.6.21 | e2dac91380a10e9e8d5883fb73ce9d9b390a629c, 0baf9d43a7b7b43df2900bd8656e75b725028b6e, 16a42c88c4667fa0bd944e438a667e059551f1f1, 2ff8156fd500d54c61430b6834137fd0a07047ce, 760a1029692f1d788dc11aa636a3bf432e58b240, 8c2f0b42fc252e1bf1c7746447091a468e784ca1, a3e340d506c1036a747fb0972aebf1063f7ef30e, bbb1ecaed4ed7680e63d3a0f143f03de32de5d6e |
| linux-kernel: Kernel | >=5.11.0 <5.15.212, >=5.16.0 <6.1.178, >=6.13.0 <6.18.40, >=6.19.0 <7.1.5, >=6.2.0 <6.6.145, >=6.7.0 <6.12.97, >=2.6.21 <5.10.261 | 5.15.212, 6.1.178, 6.18.40, 7.1.5, 6.6.145, 6.12.97, 5.10.261 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket