CVE-2026-99503: ata: sata_fsl: Fix use-after-free of host_priv on probe() failure
In the Linux kernel, the following vulnerability has been resolved:
ata: satafsl: Fix use-after-free of hostpriv on probe() failure
satafslhoststop() releases hcrbase and hostpriv:
static void satafslhoststop(struct atahost host) { struct satafslhostpriv hostpriv = host->privatedata;
iounmap(hostpriv->hcrbase); kfree(hostpriv); }
->hoststop() is called by the driver core through the atahoststop() devres action which atahoststart() registers, so it is called both when the device is unbound and when probe() fails after the host has been started.
The errorexitwithcleanup label of satafslprobe() releases hcrbase and hostpriv as well, and it is reachable from the two devicecreatefile() calls which are done after the host has been activated. In that case satafslhoststop() runs on an already freed hostpriv, resulting in a use-after-free and a double iounmap()/kfree().
Add a separate error label for the failures happening after the host has been activated, which only detaches the host and leaves hcrbase and hostpriv to satafslhoststop().
Note that atahostdetach() is dropped from errorexitwithcleanup, as that label is now only reachable while host is still NULL.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 4.5 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 4.10 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 4.15 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 4.20 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.5 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.11 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.16 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2