Skip to main content

CVE-2025-22070: Vulnerability in Linux Linux

High
VulnerabilityCVE-2025-22070cvecve-2025-22070
Published: Wed Apr 16 2025 (04/16/2025, 14:12:23 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: fs/9p: fix NULL pointer dereference on mkdir When a 9p tree was mounted with option 'posixacl', parent directory had a default ACL set for its subdirectories, e.g.: setfacl -m default:group:simpsons:rwx parentdir then creating a subdirectory crashed 9p client, as v9fs_fid_add() call in function v9fs_vfs_mkdir_dotl() sets the passed 'fid' pointer to NULL (since dafbe689736) even though the subsequent v9fs_set_create_acl() call expects a valid non-NULL 'fid' pointer: [ 37.273191] BUG: kernel NULL pointer dereference, address: 0000000000000000 ... [ 37.322338] Call Trace: [ 37.323043] <TASK> [ 37.323621] ? __die (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:434) [ 37.324448] ? page_fault_oops (arch/x86/mm/fault.c:714) [ 37.325532] ? search_module_extables (kernel/module/main.c:3733) [ 37.326742] ? p9_client_walk (net/9p/client.c:1165) 9pnet [ 37.328006] ? search_bpf_extables (kernel/bpf/core.c:804) [ 37.329142] ? exc_page_fault (./arch/x86/include/asm/paravirt.h:686 arch/x86/mm/fault.c:1488 arch/x86/mm/fault.c:1538) [ 37.330196] ? asm_exc_page_fault (./arch/x86/include/asm/idtentry.h:574) [ 37.331330] ? p9_client_walk (net/9p/client.c:1165) 9pnet [ 37.332562] ? v9fs_fid_xattr_get (fs/9p/xattr.c:30) 9p [ 37.333824] v9fs_fid_xattr_set (fs/9p/fid.h:23 fs/9p/xattr.c:121) 9p [ 37.335077] v9fs_set_acl (fs/9p/acl.c:276) 9p [ 37.336112] v9fs_set_create_acl (fs/9p/acl.c:307) 9p [ 37.337326] v9fs_vfs_mkdir_dotl (fs/9p/vfs_inode_dotl.c:411) 9p [ 37.338590] vfs_mkdir (fs/namei.c:4313) [ 37.339535] do_mkdirat (fs/namei.c:4336) [ 37.340465] __x64_sys_mkdir (fs/namei.c:4354) [ 37.341455] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 37.342447] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) Fix this by simply swapping the sequence of these two calls in v9fs_vfs_mkdir_dotl(), i.e. calling v9fs_set_create_acl() before v9fs_fid_add().

AI-Powered Analysis

AILast updated: 07/03/2025, 20:55:21 UTC

Technical Analysis

CVE-2025-22070 is a vulnerability identified in the Linux kernel's 9p filesystem client implementation, specifically within the handling of the 'posixacl' mount option for 9p trees. The 9p protocol is used for network file systems, often in virtualized environments such as QEMU/KVM setups where 9p is used to share folders between host and guest. The vulnerability arises when a 9p tree is mounted with the 'posixacl' option, which enables POSIX Access Control Lists (ACLs) on directories. If a parent directory has a default ACL set (for example, using 'setfacl -m default:group:simpsons:rwx parentdir'), creating a subdirectory triggers a NULL pointer dereference in the 9p client. This occurs because the function v9fs_fid_add() called within v9fs_vfs_mkdir_dotl() sets the 'fid' pointer to NULL, but the subsequent call to v9fs_set_create_acl() expects a valid non-NULL 'fid' pointer. The kernel then crashes due to this NULL pointer dereference, resulting in a denial of service (DoS) condition. The root cause is a sequencing error in the code: the call to set ACLs is made after the 'fid' pointer is invalidated. The fix involves swapping the order of these calls so that v9fs_set_create_acl() is invoked before v9fs_fid_add(), ensuring the 'fid' pointer remains valid during ACL setting. This vulnerability affects Linux kernel versions containing the commit dafbe689736f62c696ac64809b17bdc752cfbe76 and was published on April 16, 2025. There are no known exploits in the wild at this time, and no CVSS score has been assigned yet.

Potential Impact

The primary impact of CVE-2025-22070 is a local denial of service caused by a kernel NULL pointer dereference leading to a system crash. This can disrupt services running on affected Linux systems that utilize the 9p filesystem with the 'posixacl' option enabled, particularly in virtualized environments where 9p is commonly used for shared folders between host and guest. For European organizations, especially those relying on Linux-based virtualization infrastructure or containerized environments that leverage 9p mounts with ACLs, this vulnerability could cause unexpected system outages, impacting availability of critical applications and services. While the vulnerability does not appear to allow privilege escalation or remote code execution, the resulting kernel crash could be exploited by a local attacker or malicious process to disrupt operations. This is particularly relevant for cloud service providers, hosting companies, and enterprises with extensive Linux virtualization deployments in Europe. Additionally, organizations with strict uptime requirements or those operating critical infrastructure could face operational and reputational damage due to service interruptions. Since the vulnerability requires local access and specific filesystem configurations, the attack surface is somewhat limited, but the impact on availability remains significant.

Mitigation Recommendations

To mitigate CVE-2025-22070, European organizations should: 1) Apply the official Linux kernel patches that reorder the function calls in v9fs_vfs_mkdir_dotl() as soon as they become available from their Linux distribution vendors. 2) Temporarily avoid mounting 9p filesystems with the 'posixacl' option enabled if possible, especially on systems where ACLs on 9p shares are not critical. 3) Review and restrict local user permissions to prevent untrusted users from creating directories on 9p-mounted shares, reducing the risk of triggering the vulnerability. 4) Monitor kernel logs for signs of NULL pointer dereference crashes related to 9p filesystem operations to detect potential exploitation attempts or accidental triggers. 5) For virtualized environments, consider alternative shared folder mechanisms that do not rely on 9p with 'posixacl' until patches are applied. 6) Incorporate this vulnerability into incident response and patch management workflows to ensure timely remediation. These steps go beyond generic advice by focusing on configuration changes and operational controls specific to the 9p filesystem and ACL usage.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-29T08:45:45.814Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9831c4522896dcbe7fde

Added to database: 5/21/2025, 9:09:05 AM

Last enriched: 7/3/2025, 8:55:21 PM

Last updated: 8/12/2025, 11:46:19 AM

Views: 19

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