CVE-2021-47549: sata_fsl: fix UAF in sata_fsl_port_stop when rmmod sata_fsl

Published May 24, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

satafsl: fix UAF in satafslportstop when rmmod satafsl

When the rmmod satafsl.ko command is executed in the PPC64 GNU/Linux, a bug is reported: ================================================================== BUG: Unable to handle kernel data access on read at 0x80000800805b502c Oops: Kernel access of bad area, sig: 11 [#1] NIP [c0000000000388a4] .ioread32+0x4/0x20 LR [80000000000c6034] .satafslportstop+0x44/0xe0 [satafsl] Call Trace: .freeirq+0x1c/0x4e0 (unreliable) .atahoststop+0x74/0xd0 [libata] .releasenodes+0x330/0x3f0 .devicereleasedriverinternal+0x178/0x2c0 .driverdetach+0x64/0xd0 .busremovedriver+0x70/0xf0 .driverunregister+0x38/0x80 .platformdriverunregister+0x14/0x30 .fslsatadriverexit+0x18/0xa20 [satafsl] .sesysdeletemodule+0x1ec/0x2d0 .systemcallexception+0xfc/0x1f0 systemcallcommon+0xf8/0x200 ==================================================================

The triggering of the BUG is shown in the following stack:

driverdetach devicereleasedriverinternal devicereleasedriver drv->remove(dev) --> platformdrvremove/platformremove drv->remove(dev) --> satafslremove iounmap(hostpriv->hcrbase); <---- unmap kfree(hostpriv); <---- free devresreleaseall releasenodes dr->node.release(dev, dr->data) --> atahoststop ap->ops->portstop(ap) --> satafslportstop ioread32(hcrbase + HCONTROL) <---- UAF host->ops->hoststop(host)

The iounmap(hostpriv->hcrbase) and kfree(hostpriv) functions should not be executed in drv->remove. These functions should be executed in hoststop after portstop. Therefore, we move these functions to the new function satafslhoststop and bind the new function to hoststop.

Affected Software

10 affected components
Linux Linux kernel>=2.6.24<4.4.294
Linux Linux kernel>=4.5<4.9.292
Linux Linux kernel>=4.10<4.14.257
Linux Linux kernel>=4.15<4.19.220
Linux Linux kernel>=4.20<5.4.164
Linux Linux kernel>=5.5<5.10.84
Linux Linux kernel>=5.11<5.15.7
Linux Linux kernel=5.16-rc1
Linux Linux kernel=5.16-rc2
Linux Linux kernel=5.16-rc3

Event History

May 24, 2024
CVE Published
via MITRE·03:09 PM
Data Sourced
via MITRE·03:09 PM
Description
Data Sourced
via NVD·03:15 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2021-47549?

CVE-2021-47549 has been classified as a moderate severity vulnerability in the Linux kernel.

2

How do I fix CVE-2021-47549?

To fix CVE-2021-47549, it is recommended to update the Linux kernel to a version that addresses this vulnerability.

3

Which versions of the Linux kernel are affected by CVE-2021-47549?

CVE-2021-47549 affects Linux kernel versions from 2.6.24 to 5.16-rc3.

4

What type of vulnerability is CVE-2021-47549?

CVE-2021-47549 is a use-after-free vulnerability in the SATA FSL driver.

5

How can CVE-2021-47549 impact system security?

Exploitation of CVE-2021-47549 could lead to potential denial of service or execution of arbitrary code in privileged context.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203