ata: sata_fsl: Fix use-after-free of host_priv on probe() failure

State
Published
Severity
Not Scored
Published
Nov 19, 2026
Updated
Nov 23, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

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.

ProductVersions
Linux Linux4a46b2f5dce02539e88a300800812bd24a45e097 to before 1d90d6d679cefe20d223c2f196ffd9fea297be1f Affectedadf098e2a8a1e1fc075d6a5ba2edd13cf7189082 to before 4ef0a14d952dd4475e2016475b1dda73f63c5dae Affected6c8ad7e8cf29eb55836e7a0215f967746ab2b504 to before 6c69c0754f9052a9369c154530ca4855f9bcdca9 Affected6c8ad7e8cf29eb55836e7a0215f967746ab2b504 to before 57f0d1fcfd1eb4c05f8edb883ed34914a77a02d5 Affected6c8ad7e8cf29eb55836e7a0215f967746ab2b504 to before 3e00737e95485b2a35bf5f515f56a4c416d5971f Affected6c8ad7e8cf29eb55836e7a0215f967746ab2b504 to before 59eac6863eede5957bfd8872633608431ac42d3c Affected6c8ad7e8cf29eb55836e7a0215f967746ab2b504 to before 9d9d62dfef3609f664c60f6fe61528a2e876a64b Affected6c8ad7e8cf29eb55836e7a0215f967746ab2b504 to before 70b1196740d61aabda13b2ad0e9c1dfa2ef9cfa3 Affectedcdcd80292106df5cda325426e96495503e41f947 Affected91ba94d3f7afca195b224f77a72044fbde1389ce Affected325ea49fc43cbc03a5e1e37de8f0ca6357ced4b1 Affected0769449b0a5eabc3545337217ae690e46673e73a Affected77393806c76b6b44f1c44bd957788c8bd9152c45 Affected5.10.84 to before 5.10.275 Affected5.15.7 to before 5.15.226 Affected4.4.294 to before 4.5 Affected4.9.292 to before 4.10 Affected4.14.257 to before 4.15 Affected4.19.220 to before 4.20 Affected5.4.164 to before 5.5 Affected
Linux Linux5.16 Affectedbefore 5.16 Not Affected5.10.275 through 5.10.* Not Affected5.15.226 through 5.15.* Not Affected6.1.193 through 6.1.* Not Affected6.6.163 through 6.6.* Not Affected6.12.117 through 6.12.* Not Affected6.18.61 through 6.18.* Not Affected7.3.2 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.