CVE-2024-49982: aoe: fix the potential use-after-free problem in more places
In the Linux kernel, the following vulnerability has been resolved:
aoe: fix the potential use-after-free problem in more places
For fixing CVE-2023-6270, f98364e92662 ("aoe: fix the potential use-after-free problem in aoecmdcfgpkts") makes tx() calling devput() instead of doing in aoecmdcfgpkts(). It avoids that the tx() runs into use-after-free.
Then Nicolai Stange found more places in aoe have potential use-after-free problem with tx(). e.g. revalidate(), aoecmdatarw(), resend(), probe() and aoecmdcfgrsp(). Those functions also use aoenetxmit() to push packet to tx queue. So they should also use devhold() to increase the refcnt of skb->dev.
On the other hand, moving devput() to tx() causes that the refcnt of skb->dev be reduced to a negative value, because corresponding devhold() are not called in revalidate(), aoecmdatarw(), resend(), probe(), and aoecmdcfgrsp(). This patch fixed this issue.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch f98364e92662 - Configuration
In the AOE driver, after changing tx() to call dev_put() (per patch f98364e92662), also add/ensure matching dev_hold() calls so the refcnt of skb->dev is increased in revalidate(), aoecmd_ata_rw(), resend(), probe(), and aoecmd_cfg_rsp(), avoiding refcnt going negative and preventing use-after-free.
Linux kernel (aoe driver) dev_put() / dev_hold() refcount handling = Use dev_hold() in revalidate(), aoecmd_ata_rw(), resend(), probe(), and aoecmd_cfg_rsp() in addition to ensuring dev_put() is called in tx()
Event History
Frequently Asked Questions
What is the severity of CVE-2024-49982?
The severity of CVE-2024-49982 is classified as high due to the potential for use-after-free vulnerabilities in the Linux kernel.
How do I fix CVE-2024-49982?
To fix CVE-2024-49982, upgrade to the latest patched versions of the Linux kernel provided by your distribution.
Which versions of the Linux kernel are affected by CVE-2024-49982?
CVE-2024-49982 affects Linux kernel versions between 4.19.311 and 6.12-rc1, along with specific versions in between.
What types of systems are impacted by CVE-2024-49982?
CVE-2024-49982 primarily impacts systems running specific versions of the Linux kernel across various Linux distributions.
Are there any workarounds for CVE-2024-49982?
There are no recommended workarounds for CVE-2024-49982, so applying the security patch is essential.