Skip to main content

CVE-2024-56614: Vulnerability in Linux Linux

Critical
VulnerabilityCVE-2024-56614cvecve-2024-56614
Published: Fri Dec 27 2024 (12/27/2024, 14:51:19 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: xsk: fix OOB map writes when deleting elements Jordy says: " In the xsk_map_delete_elem function an unsigned integer (map->max_entries) is compared with a user-controlled signed integer (k). Due to implicit type conversion, a large unsigned value for map->max_entries can bypass the intended bounds check: if (k >= map->max_entries) return -EINVAL; This allows k to hold a negative value (between -2147483648 and -2), which is then used as an array index in m->xsk_map[k], which results in an out-of-bounds access. spin_lock_bh(&m->lock); map_entry = &m->xsk_map[k]; // Out-of-bounds map_entry old_xs = unrcu_pointer(xchg(map_entry, NULL)); // Oob write if (old_xs) xsk_map_sock_delete(old_xs, map_entry); spin_unlock_bh(&m->lock); The xchg operation can then be used to cause an out-of-bounds write. Moreover, the invalid map_entry passed to xsk_map_sock_delete can lead to further memory corruption. " It indeed results in following splat: [76612.897343] BUG: unable to handle page fault for address: ffffc8fc2e461108 [76612.904330] #PF: supervisor write access in kernel mode [76612.909639] #PF: error_code(0x0002) - not-present page [76612.914855] PGD 0 P4D 0 [76612.917431] Oops: Oops: 0002 [#1] PREEMPT SMP [76612.921859] CPU: 11 UID: 0 PID: 10318 Comm: a.out Not tainted 6.12.0-rc1+ #470 [76612.929189] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019 [76612.939781] RIP: 0010:xsk_map_delete_elem+0x2d/0x60 [76612.944738] Code: 00 00 41 54 55 53 48 63 2e 3b 6f 24 73 38 4c 8d a7 f8 00 00 00 48 89 fb 4c 89 e7 e8 2d bf 05 00 48 8d b4 eb 00 01 00 00 31 ff <48> 87 3e 48 85 ff 74 05 e8 16 ff ff ff 4c 89 e7 e8 3e bc 05 00 31 [76612.963774] RSP: 0018:ffffc9002e407df8 EFLAGS: 00010246 [76612.969079] RAX: 0000000000000000 RBX: ffffc9002e461000 RCX: 0000000000000000 [76612.976323] RDX: 0000000000000001 RSI: ffffc8fc2e461108 RDI: 0000000000000000 [76612.983569] RBP: ffffffff80000001 R08: 0000000000000000 R09: 0000000000000007 [76612.990812] R10: ffffc9002e407e18 R11: ffff888108a38858 R12: ffffc9002e4610f8 [76612.998060] R13: ffff888108a38858 R14: 00007ffd1ae0ac78 R15: ffffc9002e4610c0 [76613.005303] FS: 00007f80b6f59740(0000) GS:ffff8897e0ec0000(0000) knlGS:0000000000000000 [76613.013517] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [76613.019349] CR2: ffffc8fc2e461108 CR3: 000000011e3ef001 CR4: 00000000007726f0 [76613.026595] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [76613.033841] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [76613.041086] PKRU: 55555554 [76613.043842] Call Trace: [76613.046331] <TASK> [76613.048468] ? __die+0x20/0x60 [76613.051581] ? page_fault_oops+0x15a/0x450 [76613.055747] ? search_extable+0x22/0x30 [76613.059649] ? search_bpf_extables+0x5f/0x80 [76613.063988] ? exc_page_fault+0xa9/0x140 [76613.067975] ? asm_exc_page_fault+0x22/0x30 [76613.072229] ? xsk_map_delete_elem+0x2d/0x60 [76613.076573] ? xsk_map_delete_elem+0x23/0x60 [76613.080914] __sys_bpf+0x19b7/0x23c0 [76613.084555] __x64_sys_bpf+0x1a/0x20 [76613.088194] do_syscall_64+0x37/0xb0 [76613.091832] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [76613.096962] RIP: 0033:0x7f80b6d1e88d [76613.100592] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 73 b5 0f 00 f7 d8 64 89 01 48 [76613.119631] RSP: 002b:00007ffd1ae0ac68 EFLAGS: 00000206 ORIG_RAX: 0000000000000141 [76613.131330] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f80b6d1e88d [76613.142632] RDX: 0000000000000098 RSI: 00007ffd1ae0ad20 RDI: 0000000000000003 [76613.153967] RBP: 00007ffd1ae0adc0 R08: 0000000000000000 R09: 0000000000000000 [76613.166030] R10: 00007f80b6f77040 R11: 0000000000000206 R12: 00007ffd1ae0aed8 [76613.177130] R13: 000055ddf42ce1e9 R14: 000055ddf42d0d98 R15: 00 ---truncated---

AI-Powered Analysis

AILast updated: 06/28/2025, 12:26:32 UTC

Technical Analysis

CVE-2024-56614 is a vulnerability in the Linux kernel's XDP socket (xsk) map implementation, specifically in the xsk_map_delete_elem function. The flaw arises due to improper handling of signed and unsigned integer comparisons during bounds checking. The function compares a user-controlled signed integer index 'k' against an unsigned integer 'map->max_entries'. Because of implicit type conversion, a negative signed integer value for 'k' (ranging from -2147483648 to -2) can bypass the bounds check. This leads to an out-of-bounds (OOB) access when 'k' is used as an array index into 'm->xsk_map[k]'. The subsequent exchange operation (xchg) on this invalid pointer results in an out-of-bounds write. Furthermore, the corrupted map entry passed to xsk_map_sock_delete can cause additional memory corruption. The vulnerability can cause kernel crashes (kernel oops) and potentially arbitrary code execution or privilege escalation due to memory corruption in kernel space. The detailed kernel panic logs show a page fault triggered by an invalid kernel-mode write, confirming the severity of the memory corruption. This vulnerability affects Linux kernel versions prior to the patch and is particularly critical because it involves kernel memory corruption triggered by user-controlled input via the BPF syscall interface. No known exploits are currently reported in the wild, but the nature of the vulnerability makes it a high-risk target for attackers aiming to escalate privileges or cause denial of service on Linux systems using XDP sockets.

Potential Impact

For European organizations, this vulnerability poses a significant risk, especially for those relying on Linux-based infrastructure, including servers, network appliances, and cloud environments. The xsk (XDP socket) feature is used in high-performance packet processing and networking applications, which are common in telecom, financial services, and critical infrastructure sectors across Europe. Exploitation could allow attackers to execute arbitrary code in kernel mode, leading to full system compromise, data breaches, or service outages. This is particularly concerning for organizations handling sensitive personal data under GDPR, as a breach could result in regulatory penalties and reputational damage. Additionally, the vulnerability could be leveraged to disrupt critical services or infrastructure, impacting availability and operational continuity. The lack of known exploits currently provides a window for mitigation, but the potential for rapid weaponization means European entities must act swiftly to patch affected systems.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions where this vulnerability is patched. Since the vulnerability involves the BPF syscall and XDP socket maps, organizations should audit and restrict access to BPF-related capabilities, limiting them to trusted users and processes only. Employ kernel-level security modules such as SELinux or AppArmor to enforce strict access controls on kernel interfaces. Network segmentation can reduce exposure of vulnerable systems to untrusted users. Monitoring kernel logs for unusual OOB accesses or crashes related to xsk_map_delete_elem can provide early detection of exploitation attempts. For environments where immediate patching is not feasible, consider disabling or restricting XDP socket usage temporarily. Finally, maintain an up-to-date inventory of Linux kernel versions deployed across infrastructure to ensure timely patch management.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-27T14:03:06.014Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9823c4522896dcbdf3bc

Added to database: 5/21/2025, 9:08:51 AM

Last enriched: 6/28/2025, 12:26:32 PM

Last updated: 8/16/2025, 2:47:48 PM

Views: 21

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats