CVE-2024-49982 aoe: fix the potential use-after-free problem in more places
A use-after-free vulnerability in the Linux kernel's aoe driver allows attackers to potentially execute arbitrary code or escalate privileges.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-49982?
CVE-2024-49982 is a high-severity use after free vulnerability in Linux kernel, published on 21 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
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 aoecmd_cfg_pkts") makes tx() calling dev_put() instead of doing in aoecmd_cfg_pkts(). 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(), aoecmd_ata_rw(), resend(), probe() and aoecmd_cfg_rsp(). Those functions also use aoenet_xmit() to push packet to tx queue. So they should also use dev_hold() to increase the refcnt of skb->dev.
On the other hand, moving dev_put() to tx() causes that the refcnt of skb->dev be reduced to a negative value, because corresponding dev_hold() are not called in revalidate(), aoecmd_ata_rw(), resend(), probe(), and aoecmd_cfg_rsp(). This patch fixed this issue.
Weakness: CWE-416
Which versions are affected by CVE-2024-49982?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-49982?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2024-49982 being exploited?
There is no known exploitation of CVE-2024-49982 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-51372, BELL-CVE-2024-49982, DEBIAN-CVE-2024-49982, GHSA-g9fr-wfpx-28xj, UBUNTU-CVE-2024-49982.