ata: sata_fsl: Fix use-after-free of host_priv on probe() failure
- CVE-2026-99503
- GHSA-cx5f-f8w9-p3p7
- EUVD-2026-130179
Description
In the Linux kernel, the following vulnerability has been resolved: ata: sata_fsl: Fix use-after-free of host_priv on probe() failure sata_fsl_host_stop() releases hcr_base and host_priv: static void sata_fsl_host_stop(struct ata_host *host) { struct sata_fsl_host_priv *host_priv = host->private_data; iounmap(host_priv->hcr_base); kfree(host_priv); } ->host_stop() is called by the driver core through the ata_host_stop() devres action which ata_host_start() registers, so it is called both when the device is unbound and when probe() fails after the host has been started. The error_exit_with_cleanup label of sata_fsl_probe() releases hcr_base and host_priv as well, and it is reachable from the two device_create_file() calls which are done after the host has been activated. In that case sata_fsl_host_stop() runs on an already freed host_priv, 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 hcr_base and host_priv to sata_fsl_host_stop(). Note that ata_host_detach() is dropped from error_exit_with_cleanup, as that label is now only reachable while host is still NULL.
Text from the CVE.org record.
Recommendation
Linux
- If you run 5.15.xupdate to 5.15.226 or laterPatch update: breaking changes are unlikely
- If you run 5.10.xupdate to 5.10.275 or laterPatch update: breaking changes are unlikely
- If you run a version from 5.4.164 to before 5.5update to 5.5 or laterMinor version change: check the release notes
- If you run a version from 4.19.220 to before 4.20update to 4.20 or laterMinor version change: check the release notes
- If you run a version from 4.14.257 to before 4.15update to 4.15 or laterMinor version change: check the release notes
- If you run a version from 4.9.292 to before 4.10update to 4.10 or laterMinor version change: check the release notes
- If you run a version from 4.4.294 to before 4.5update to 4.5 or laterMinor version change: check the release notes
Some affected versions have no stated fix.
Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
Linux
Affected versions Fixed in from 5.15.7 to before 5.15.226 5.15.226 from 5.10.84 to before 5.10.275 5.10.275 from 5.4.164 to before 5.5 5.5 from 4.19.220 to before 4.20 4.20 from 4.14.257 to before 4.15 4.15 from 4.9.292 to before 4.10 4.10 from 4.4.294 to before 4.5 4.5 5.16 none stated and 9 more
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.