Skip to main content

CVE-2021-47316: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2021-47316cvecve-2021-47316
Published: Tue May 21 2024 (05/21/2024, 14:35:32 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: nfsd: fix NULL dereference in nfs3svc_encode_getaclres In error cases the dentry may be NULL. Before 20798dfe249a, the encoder also checked dentry and d_really_is_positive(dentry), but that looks like overkill to me--zero status should be enough to guarantee a positive dentry. This isn't the first time we've seen an error-case NULL dereference hidden in the initialization of a local variable in an xdr encoder. But I went back through the other recent rewrites and didn't spot any similar bugs.

AI-Powered Analysis

AILast updated: 06/26/2025, 10:53:57 UTC

Technical Analysis

CVE-2021-47316 is a vulnerability identified in the Linux kernel's NFS server implementation, specifically within the nfs3svc_encode_getaclres function responsible for encoding Access Control List (ACL) responses in NFSv3. The vulnerability arises from a NULL pointer dereference condition that occurs in error cases when the dentry (directory entry) pointer is NULL. The affected code path previously assumed that a zero status code was sufficient to guarantee a valid (positive) dentry, but this assumption was incorrect, leading to potential dereferencing of a NULL pointer. This flaw can cause the kernel to crash or panic, resulting in a denial of service (DoS) condition. The issue was addressed by correcting the logic to properly handle NULL dentry pointers during the encoding process. The vulnerability does not appear to have any known exploits in the wild at the time of publication, and no CVSS score has been assigned. The affected versions correspond to specific Linux kernel commits prior to the fix. The root cause is a logic error in error handling within the NFS server's XDR encoder, which is critical for network file system operations. While this vulnerability does not directly allow code execution or privilege escalation, the resulting kernel crash can disrupt services relying on NFS, impacting system availability.

Potential Impact

For European organizations, especially those relying heavily on Linux-based infrastructure and NFS for file sharing and storage, this vulnerability poses a risk of service disruption. A successful exploitation would lead to kernel crashes on affected systems, causing denial of service conditions that could interrupt business-critical applications and data access. This is particularly impactful for sectors such as finance, manufacturing, research institutions, and public services where Linux servers and NFS are commonly used. The disruption could affect internal operations and potentially delay workflows dependent on shared file systems. Although no remote code execution or data breach is indicated, the availability impact can lead to operational downtime and associated financial and reputational costs. Organizations with large-scale Linux deployments or those using NFS in multi-user environments should be particularly vigilant. Given the lack of known exploits, the immediate threat level is moderate, but unpatched systems remain vulnerable to accidental or malicious triggering of the flaw.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should promptly apply the official Linux kernel patches that address CVE-2021-47316. Kernel updates containing the fix should be prioritized in maintenance schedules. For environments where immediate patching is not feasible, administrators can consider temporarily disabling NFSv3 services or restricting access to trusted networks to reduce exposure. Monitoring kernel logs for OOPS or panic messages related to nfs3svc_encode_getaclres can help detect attempts to trigger the vulnerability. Additionally, implementing robust network segmentation and firewall rules to limit access to NFS servers can reduce the attack surface. Organizations should also review their incident response plans to handle potential DoS incidents caused by kernel crashes. Regular backups and high availability configurations for critical Linux servers can minimize operational impact. Finally, maintaining up-to-date inventories of Linux kernel versions in use will facilitate rapid identification of vulnerable systems.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-21T14:28:16.973Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9835c4522896dcbea3f8

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

Last enriched: 6/26/2025, 10:53:57 AM

Last updated: 8/16/2025, 2:54:01 AM

Views: 12

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