Skip to main content

CVE-2021-47312: Vulnerability in Linux Linux

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

Description

In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_tables: Fix dereference of null pointer flow In the case where chain->flags & NFT_CHAIN_HW_OFFLOAD is false then nft_flow_rule_create is not called and flow is NULL. The subsequent error handling execution via label err_destroy_flow_rule will lead to a null pointer dereference on flow when calling nft_flow_rule_destroy. Since the error path to err_destroy_flow_rule has to cater for null and non-null flows, only call nft_flow_rule_destroy if flow is non-null to fix this issue. Addresses-Coverity: ("Explicity null dereference")

AI-Powered Analysis

AILast updated: 06/26/2025, 11:05:17 UTC

Technical Analysis

CVE-2021-47312 is a medium-severity vulnerability in the Linux kernel's netfilter subsystem, specifically within the nftables component responsible for packet filtering and firewall functionality. The flaw arises due to improper handling of a null pointer dereference in the nft_flow_rule_destroy function. When the condition chain->flags & NFT_CHAIN_HW_OFFLOAD is false, the nft_flow_rule_create function is not invoked, leaving the flow pointer as NULL. However, the error handling path erroneously calls nft_flow_rule_destroy on this NULL pointer, leading to a null pointer dereference (CWE-476). This can cause a kernel crash (denial of service) due to the kernel dereferencing a NULL pointer, impacting system availability. The vulnerability does not affect confidentiality or integrity directly and does not require user interaction but does require local privileges (low privilege user) to exploit. The CVSS 3.1 score is 5.5 (medium), reflecting the moderate impact and the need for local privileges. No known exploits are currently reported in the wild. The issue was addressed by adding a check to ensure nft_flow_rule_destroy is only called if the flow pointer is non-null, preventing the null dereference and subsequent kernel panic.

Potential Impact

For European organizations, this vulnerability primarily poses a risk of denial of service on Linux systems that utilize nftables for network filtering. Systems affected include servers, network appliances, and embedded devices running vulnerable Linux kernel versions. A successful exploit could cause kernel crashes, leading to service interruptions, potential downtime, and operational disruption. This is particularly critical for infrastructure providers, data centers, and enterprises relying on Linux-based firewalls or routers. Although the vulnerability requires local access with low privileges, it could be leveraged by attackers who have gained limited access to escalate impact by causing system instability. The lack of confidentiality or integrity impact limits the scope to availability concerns. Given the widespread use of Linux in European IT environments, especially in cloud, telecom, and industrial sectors, the vulnerability could affect critical infrastructure if unpatched.

Mitigation Recommendations

European organizations should promptly apply the official Linux kernel patches that address CVE-2021-47312. If immediate patching is not feasible, mitigating controls include restricting local user access to trusted personnel only and employing strict access controls to prevent unprivileged users from triggering the vulnerability. Monitoring kernel logs for unexpected crashes or nftables-related errors can help detect exploitation attempts. Network segmentation can limit the impact of compromised hosts. Additionally, organizations should ensure that their configuration management and update processes include timely Linux kernel updates. For embedded or specialized devices, coordinate with vendors for firmware updates incorporating the fix. Avoid running unnecessary nftables chains or disable hardware offload features if not required, as this may reduce exposure. Finally, conduct internal audits to identify systems running vulnerable kernel versions and prioritize patching accordingly.

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
3.1
State
PUBLISHED

Threat ID: 682d9835c4522896dcbea3dd

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

Last enriched: 6/26/2025, 11:05:17 AM

Last updated: 8/8/2025, 7:08:48 AM

Views: 13

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