CVE-2026-139517: floppy: unregister platform device on add_disk failure
In the Linux kernel, the following vulnerability has been resolved:
floppy: unregister platform device on adddisk failure
The change referenced by the Fixes tag reverted a previous fix because that fix added incorrect cleanup for the platformdeviceregister() failure path.
However, reverting the whole change also removed the cleanup for a later failure path. If platformdeviceregister() succeeds but deviceadddisk() fails, the current floppy platform device has already been registered and registered[drive] has been set.
The common outremovedrives path uses while (drive--), so it starts from the previous drive and does not unregister the current one. As a result, the platform device registered for the failing drive is leaked.
Unregister the current platform device directly on the deviceadddisk() failure path, where platformdeviceregister() is known to have succeeded. Leave the platformdeviceregister() failure path unchanged.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Compensating control
On the device_add_disk() failure path, directly unregister the current floppy platform device; leave the platform_device_register() failure path unchanged.
Event History
Frequently Asked Questions
Under what conditions does the resource leak occur?
It occurs when platform_device_register() succeeds for a floppy drive but device_add_disk() subsequently fails. The cleanup path skips the currently failing drive, leaving its already-registered platform device unregistered.
What is the practical impact of the failure?
A platform device associated with the failing floppy drive is leaked. The issue is limited to the later device_add_disk() failure path; the platform_device_register() failure path is not changed.
How can an affected system be identified?
The affected condition requires a floppy drive initialization attempt in which platform device registration succeeds and disk addition fails. The provided information does not specify a user-visible indicator, affected kernel versions, or a diagnostic message for detecting this state.