Skip to main content

CVE-2024-26608: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-26608cvecve-2024-26608
Published: Thu Feb 29 2024 (02/29/2024, 15:52:14 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix global oob in ksmbd_nl_policy Similar to a reported issue (check the commit b33fb5b801c6 ("net: qualcomm: rmnet: fix global oob in rmnet_policy"), my local fuzzer finds another global out-of-bounds read for policy ksmbd_nl_policy. See bug trace below: ================================================================== BUG: KASAN: global-out-of-bounds in validate_nla lib/nlattr.c:386 [inline] BUG: KASAN: global-out-of-bounds in __nla_validate_parse+0x24af/0x2750 lib/nlattr.c:600 Read of size 1 at addr ffffffff8f24b100 by task syz-executor.1/62810 CPU: 0 PID: 62810 Comm: syz-executor.1 Tainted: G N 6.1.0 #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8b/0xb3 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x172/0x475 mm/kasan/report.c:395 kasan_report+0xbb/0x1c0 mm/kasan/report.c:495 validate_nla lib/nlattr.c:386 [inline] __nla_validate_parse+0x24af/0x2750 lib/nlattr.c:600 __nla_parse+0x3e/0x50 lib/nlattr.c:697 __nlmsg_parse include/net/netlink.h:748 [inline] genl_family_rcv_msg_attrs_parse.constprop.0+0x1b0/0x290 net/netlink/genetlink.c:565 genl_family_rcv_msg_doit+0xda/0x330 net/netlink/genetlink.c:734 genl_family_rcv_msg net/netlink/genetlink.c:833 [inline] genl_rcv_msg+0x441/0x780 net/netlink/genetlink.c:850 netlink_rcv_skb+0x14f/0x410 net/netlink/af_netlink.c:2540 genl_rcv+0x24/0x40 net/netlink/genetlink.c:861 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x54e/0x800 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x930/0xe50 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0x154/0x190 net/socket.c:734 ____sys_sendmsg+0x6df/0x840 net/socket.c:2482 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2536 __sys_sendmsg+0xf3/0x1c0 net/socket.c:2565 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fdd66a8f359 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdd65e00168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fdd66bbcf80 RCX: 00007fdd66a8f359 RDX: 0000000000000000 RSI: 0000000020000500 RDI: 0000000000000003 RBP: 00007fdd66ada493 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc84b81aff R14: 00007fdd65e00300 R15: 0000000000022000 </TASK> The buggy address belongs to the variable: ksmbd_nl_policy+0x100/0xa80 The buggy address belongs to the physical page: page:0000000034f47940 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1ccc4b flags: 0x200000000001000(reserved|node=0|zone=2) raw: 0200000000001000 ffffea00073312c8 ffffea00073312c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffffffff8f24b000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffffff8f24b080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffffff8f24b100: f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9 00 00 07 f9 ^ ffffffff8f24b180: f9 f9 f9 f9 00 05 f9 f9 f9 f9 f9 f9 00 00 00 05 ffffffff8f24b200: f9 f9 f9 f9 00 00 03 f9 f9 f9 f9 f9 00 00 04 f9 ================================================================== To fix it, add a placeholder named __KSMBD_EVENT_MAX and let KSMBD_EVENT_MAX to be its original value - 1 according to what other netlink families do. Also change two sites that refer the KSMBD_EVENT_MAX to correct value.

AI-Powered Analysis

AILast updated: 07/03/2025, 01:58:07 UTC

Technical Analysis

CVE-2024-26608 is a high-severity vulnerability identified in the Linux kernel, specifically within the ksmbd (Kernel SMB Daemon) component. The issue is a global out-of-bounds (OOB) read in the ksmbd_nl_policy, which is part of the netlink attribute validation logic. This vulnerability is similar to a previously reported global OOB read in the Qualcomm rmnet_policy. The bug manifests as an out-of-bounds read of memory due to improper validation of netlink attributes, leading to a read beyond the allocated bounds of the ksmbd_nl_policy array. The vulnerability was detected by kernel address sanitizer (KASAN) during fuzz testing and results in a global OOB read in the validate_nla function, which is responsible for validating netlink attributes. The root cause is an off-by-one error in the handling of the KSMBD_EVENT_MAX constant, which defines the maximum index for netlink policy entries. The fix involves adding a placeholder __KSMBD_EVENT_MAX and adjusting KSMBD_EVENT_MAX to be one less than its original value, aligning with the approach used by other netlink families. This correction ensures that all references to KSMBD_EVENT_MAX are within valid bounds, preventing the OOB read. The vulnerability affects Linux kernel versions prior to the patch and requires local privileges (PR:L) to exploit, with no user interaction needed (UI:N). The attack vector is local (AV:L), meaning an attacker must have some level of access to the system to trigger the flaw. The impact is significant, with potential for full confidentiality, integrity, and availability compromise (C:H/I:H/A:H), as the kernel memory corruption could lead to privilege escalation, information disclosure, or system crashes. No known exploits are currently reported in the wild, but the vulnerability's nature and high CVSS score (7.8) indicate a strong potential for exploitation if left unpatched. The vulnerability is categorized under CWE-125 (Out-of-bounds Read), a common and critical class of memory safety errors in kernel code.

Potential Impact

For European organizations, this vulnerability poses a substantial risk, especially those relying on Linux-based infrastructure, including servers, cloud environments, and embedded systems. The ksmbd component is used for SMB protocol support in the Linux kernel, which is critical for file sharing and network communication in enterprise environments. Exploitation could allow a local attacker to read sensitive kernel memory, potentially leading to privilege escalation and full system compromise. This could result in data breaches, disruption of critical services, and loss of data integrity. Organizations in sectors such as finance, healthcare, government, and critical infrastructure, which often use Linux servers for file sharing and network services, are particularly at risk. The local attack vector means that attackers would need some initial access, which could be gained through other vulnerabilities or insider threats. The high severity of the vulnerability means that exploitation could have severe consequences, including unauthorized access to sensitive information and disruption of business operations. Additionally, the widespread use of Linux in cloud and virtualized environments across Europe amplifies the potential impact, as compromised hosts could affect multiple tenants or services.

Mitigation Recommendations

To mitigate CVE-2024-26608, European organizations should prioritize the following actions: 1) Apply the official Linux kernel patches that address the ksmbd_nl_policy out-of-bounds read as soon as they become available from trusted Linux distribution vendors or the Linux kernel mainline. 2) For environments where immediate patching is not feasible, consider disabling the ksmbd service or the SMB kernel daemon functionality temporarily to reduce the attack surface, especially on systems exposed to untrusted users. 3) Implement strict access controls and monitoring to limit local user privileges, reducing the risk of an attacker gaining the necessary local access to exploit the vulnerability. 4) Use kernel hardening features such as Kernel Address Sanitizer (KASAN) and other memory protection mechanisms to detect and prevent exploitation attempts during testing and development phases. 5) Conduct thorough audits of local user accounts and running services to identify and remediate any unnecessary privileges or access that could be leveraged by attackers. 6) Employ intrusion detection and prevention systems capable of monitoring for anomalous kernel or netlink activity that might indicate exploitation attempts. 7) Maintain up-to-date backups and incident response plans to quickly recover from potential compromises resulting from exploitation. These measures, combined with timely patching, will significantly reduce the risk posed by this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-02-19T14:20:24.130Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d982bc4522896dcbe4188

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

Last enriched: 7/3/2025, 1:58:07 AM

Last updated: 7/31/2025, 1:42:08 AM

Views: 8

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