CVE-2021-47312 netfilter: nf_tables: Fix dereference of null pointer flow

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel netfilter subsystem allows local attackers to cause a denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
None listed

What is CVE-2021-47312?

CVE-2021-47312 is a medium-severity vulnerability in Linux kernel, published on 21 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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")

Weakness: CWE-476

Which versions are affected by CVE-2021-47312?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47312?

No fix has been published for CVE-2021-47312 yet. Limit exposure of the affected software until one is available.

Is CVE-2021-47312 being exploited?

There is no known exploitation of CVE-2021-47312 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as GHSA-jhg5-q2mj-r9vh, UBUNTU-CVE-2021-47312.

Is CVE-2021-47312 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free