Skip to main content

CVE-2024-26870: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-26870cvecve-2024-26870
Published: Wed Apr 17 2024 (04/17/2024, 10:27:30 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: NFSv4.2: fix nfs4_listxattr kernel BUG at mm/usercopy.c:102 A call to listxattr() with a buffer size = 0 returns the actual size of the buffer needed for a subsequent call. When size > 0, nfs4_listxattr() does not return an error because either generic_listxattr() or nfs4_listxattr_nfs4_label() consumes exactly all the bytes then size is 0 when calling nfs4_listxattr_nfs4_user() which then triggers the following kernel BUG: [ 99.403778] kernel BUG at mm/usercopy.c:102! [ 99.404063] Internal error: Oops - BUG: 00000000f2000800 [#1] SMP [ 99.408463] CPU: 0 PID: 3310 Comm: python3 Not tainted 6.6.0-61.fc40.aarch64 #1 [ 99.415827] Call trace: [ 99.415985] usercopy_abort+0x70/0xa0 [ 99.416227] __check_heap_object+0x134/0x158 [ 99.416505] check_heap_object+0x150/0x188 [ 99.416696] __check_object_size.part.0+0x78/0x168 [ 99.416886] __check_object_size+0x28/0x40 [ 99.417078] listxattr+0x8c/0x120 [ 99.417252] path_listxattr+0x78/0xe0 [ 99.417476] __arm64_sys_listxattr+0x28/0x40 [ 99.417723] invoke_syscall+0x78/0x100 [ 99.417929] el0_svc_common.constprop.0+0x48/0xf0 [ 99.418186] do_el0_svc+0x24/0x38 [ 99.418376] el0_svc+0x3c/0x110 [ 99.418554] el0t_64_sync_handler+0x120/0x130 [ 99.418788] el0t_64_sync+0x194/0x198 [ 99.418994] Code: aa0003e3 d000a3e0 91310000 97f49bdb (d4210000) Issue is reproduced when generic_listxattr() returns 'system.nfs4_acl', thus calling lisxattr() with size = 16 will trigger the bug. Add check on nfs4_listxattr() to return ERANGE error when it is called with size > 0 and the return value is greater than size.

AI-Powered Analysis

AILast updated: 06/29/2025, 19:41:06 UTC

Technical Analysis

CVE-2024-26870 is a vulnerability identified in the Linux kernel affecting the NFSv4.2 implementation, specifically in the handling of extended attributes (xattr) via the listxattr() system call. The flaw arises when listxattr() is called with a buffer size of zero, which is intended to return the size of the buffer needed for a subsequent call. When the size is greater than zero, the nfs4_listxattr() function does not properly handle cases where the returned data exactly matches the buffer size, leading to a scenario where the size becomes zero upon calling nfs4_listxattr_nfs4_user(). This triggers a kernel BUG at mm/usercopy.c:102, causing an internal kernel error and system crash (kernel oops). The issue is reproducible when generic_listxattr() returns the attribute 'system.nfs4_acl', and invoking listxattr() with a size of 16 triggers the bug. The root cause is a missing bounds check in nfs4_listxattr() that should return an ERANGE error when the returned data size exceeds the provided buffer size. This vulnerability can cause denial of service (DoS) by crashing the kernel when exploited. The bug trace shows it affects ARM64 architecture but is likely not limited to it. The vulnerability has been resolved by adding the necessary size check to prevent the kernel BUG. No known exploits are reported in the wild yet, and no CVSS score has been assigned. The vulnerability affects Linux kernel versions identified by the commit hash 012a211abd5db098094ce429de5f046368391e68, which corresponds to recent kernel releases.

Potential Impact

For European organizations, this vulnerability poses a risk primarily in environments using NFSv4.2 for network file sharing on Linux systems. Exploitation leads to a kernel crash, causing denial of service and potential disruption of critical services relying on NFS shares. This can impact data availability and operational continuity, especially in sectors like finance, manufacturing, research, and government where Linux servers and NFS are common. While the vulnerability does not directly lead to privilege escalation or data leakage, the induced system instability can be leveraged to disrupt services or as part of a larger attack chain. Organizations with large-scale Linux deployments or those using ARM64 architectures in their infrastructure may be more exposed. The lack of known exploits reduces immediate risk, but the vulnerability’s presence in the kernel means that unpatched systems remain susceptible to accidental or malicious triggering of the kernel BUG, potentially causing outages. Given the critical role of Linux in European data centers and cloud environments, the impact could be significant if exploited at scale or in sensitive environments.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions that include the patch for CVE-2024-26870. Specifically, they should track kernel updates from their Linux distribution vendors (e.g., Debian, Ubuntu, Red Hat, SUSE) and apply security patches promptly. In environments where immediate patching is not feasible, administrators should consider restricting access to NFSv4.2 services to trusted users and networks only, minimizing exposure to untrusted or external clients that could trigger the vulnerability. Monitoring kernel logs for BUG or Oops messages related to usercopy.c or listxattr calls can help detect attempted exploitation or accidental triggers. Additionally, organizations should audit their use of extended attributes on NFS shares and consider disabling or limiting the use of system.nfs4_acl attributes if not required. Implementing strict network segmentation and access controls around NFS servers will reduce the attack surface. Finally, testing patches in staging environments before production deployment will ensure stability and compatibility.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d982bc4522896dcbe3dfe

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

Last enriched: 6/29/2025, 7:41:06 PM

Last updated: 8/4/2025, 6:48:31 PM

Views: 11

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