What’s Vulnerable › Vulnerabilities
CVE-2021-47312: netfilter: nf_tables: Fix dereference of null pointer flow
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-05-21 · updated 2026-06-17
- Weakness: CWE-476
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")
Affected products
- Linux kernel: from 5.13.2 before 5.13.5 — fixed in 5.13.5
How to fix
Upgrade to a fixed version: Linux kernel 5.13.5. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/4ca041f919f13783b0b03894783deee00dbca19a
- https://git.kernel.org/stable/c/70a5a1950cca02c5cd161bb3846b4d983eed97d3
- https://git.kernel.org/stable/c/4ca041f919f13783b0b03894783deee00dbca19a
- https://git.kernel.org/stable/c/70a5a1950cca02c5cd161bb3846b4d983eed97d3
Get alerted when CVE-2021-47312 or the next vulnerability affects your stack