CVE-2021-47312·Kernel vulnerability
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")
- Severity
- medium
- Software
- Kernel
- Fixed in
- 5.13.5
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 16% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 5.13.2
Until: 5.13.5
Fixed in: 5.13.5
How to fix this CVE
Update your Linux kernel to version 5.13.5 or later to resolve a null pointer dereference in the netfilter nf_tables module that could cause a kernel panic when hardware offload rules are misconfigured. This patch adds proper null-checking logic in the error handling path to prevent crashes during chain rule destruction.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your kernel version with `uname -r` and verify if it falls between 5.13.2 and 5.13.4 (inclusive)
- Step 2: Verify if nf_tables is loaded with `lsmod | grep nf_tables` to confirm the vulnerable module is active
- Step 3: Search kernel logs for crash signatures with `dmesg | grep -i 'null pointer\|nf_tables\|nft_flow_rule'` to detect past exploitation attempts
- Step 4: After patching, confirm the new kernel version with `uname -r` and verify it reports 5.13.5 or later
FAQ
What is CVE-2021-47312?
This vulnerability is a null pointer dereference flaw in the Linux kernel's netfilter nf_tables subsystem where improper error handling causes a kernel crash when hardware offload is disabled on certain chain configurations.
Is CVE-2021-47312 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog and no public exploits are available. However, it can be trivially triggered by any local user with appropriate privileges.
What versions of Kernel are affected by CVE-2021-47312?
Linux kernel versions 5.13.2 through 5.13.4 are affected. Version 5.13.5 and later contain the fix.
How do I check if my server is vulnerable to CVE-2021-47312?
Run `uname -r` to check your kernel version. If it shows 5.13.2, 5.13.3, or 5.13.4, you are vulnerable. Additionally, verify nf_tables is in use with `lsmod | grep nf_tables`.
Does Defensia detect CVE-2021-47312?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47312 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47312. Free for 1 server.
Get started free