CVE-2024-57795·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: RDMA/rxe: Remove the direct link to net_device The similar patch in siw is in the link: https://git.kernel.org/rdma/rdma/c/16b87037b48889 This problem also occurred in RXE. The following analyze this problem. In the following Call Traces: " BUG: KASAN: slab-use-after-free in dev_get_flags+0x188/0x1d0 net/core/dev.c:8782 Read of size 4 at addr ffff8880554640b0 by task kworker/1:4/5295 CPU: 1 UID: 0 PID: 5295 Comm: kworker/1:4 Not tainted 6.12.0-rc3-syzkaller-00399-g9197b73fd7bb #0 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: infiniband ib_cache_event_task Call Trace: <TASK> __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 dev_get_flags+0x188/0x1d0 net/core/dev.c:8782 rxe_query_port+0x12d/0x260 drivers/infiniband/sw/rxe/rxe_verbs.c:60 __ib_query_port drivers/infiniband/core/device.c:2111 [inline] ib_query_port+0x168/0x7d0 drivers/infiniband/core/device.c:2143 ib_cache_update+0x1a9/0xb80 drivers/infiniband/core/cache.c:1494 ib_cache_event_task+0xf3/0x1e0 drivers/infiniband/core/cache.c:1568 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa65/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 </TASK> " 1). In the link [1], " infiniband syz2: set down " This means that on 839.350575, the event ib_cache_event_task was sent andi queued in ib_wq. 2). In the link [1], " team0 (unregistering): Port device team_slave_0 removed " It indicates that before 843.251853, the net device should be freed. 3). In the link [1], " BUG: KASAN: slab-use-after-free in dev_get_flags+0x188/0x1d0 " This means that on 850.559070, this slab-use-after-free problem occurred. In all, on 839.350575, the event ib_cache_event_task was sent and queued in ib_wq, before 843.251853, the net device veth was freed. on 850.559070, this event was executed, and the mentioned freed net device was called. Thus, the above call trace occurred. [1] https://syzkaller.appspot.com/x/log.txt?x=12e7025f980000
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.12.9
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 4% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2024-57795 scores 7.8 on CVSS, so a successful attack would be serious — but at <0.1%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 4.8
Until: 6.12.9
Fixed in: 6.12.9
How to fix this CVE
Update your Linux kernel to version 6.12.9 or later to resolve this use-after-free vulnerability in the RDMA RXE driver. The vulnerability allows kernel memory corruption when network device events are processed after device destruction, potentially leading to system instability or privilege escalation. Apply the patch immediately on systems running affected kernel versions 4.8 through 6.12.8.
sudo dnf update kernelDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your installed kernel version with `uname -r` and compare against the affected range (4.8 to 6.12.8)
- Step 2: Verify if RDMA RXE driver is in use with `lsmod | grep rdma_rxe` or `grep -r 'rxe' /sys/class/infiniband/`
- Step 3: Search system logs for use-after-free KASAN reports with `dmesg | grep -i 'slab-use-after-free'` or `journalctl | grep -i 'dev_get_flags'`
- Step 4: After patching, verify the new kernel version with `uname -r` and confirm it is 6.12.9 or later
FAQ
What is CVE-2024-57795?
CVE-2024-57795 is a use-after-free vulnerability in the Linux kernel's RDMA RXE (Soft RDMA over Ethernet) driver that occurs when infiniband cache events reference a network device that has already been freed, causing memory corruption and potential denial of service or privilege escalation.
Is CVE-2024-57795 being actively exploited?
No, CVE-2024-57795 is not listed in the CISA Known Exploited Vulnerabilities catalog and no public exploits are currently available. However, the high CVSS score (7.8) indicates significant risk if exploited.
What versions of Kernel are affected by CVE-2024-57795?
Linux kernel versions 4.8 through 6.12.8 are affected. The vulnerability was resolved in kernel version 6.12.9 and later.
How do I check if my server is vulnerable to CVE-2024-57795?
Run `uname -r` to get your kernel version. If it falls between 4.8 and 6.12.8 and you have RDMA/RXE enabled (`lsmod | grep rdma_rxe`), your system is vulnerable.
Does Defensia detect CVE-2024-57795?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-57795 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-57795. Free for 1 server.
Get started free