CVE-2021-47312

netfilter: nf_tables: Fix dereference of null pointer flow

State
Published
Severity
5.5 Medium
Published
May 21, 2024
Updated
May 11, 2026
Reserved
May 21, 2024

Read the record on cve.org

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

Scores

CVSSScoreVectorSource
3.15.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HCISA-ADP

Weaknesses

Affected Products

ProductVersions
LinuxLinux
  • 09b1f676e2e0bbff67c568672c565c6f31470157 to before 70a5a1950cca02c5cd161bb3846b4d983eed97d3Affected
  • 3c5e44622011b9ea21bd425875dcccfc9a158f5f to before 4ca041f919f13783b0b03894783deee00dbca19aAffected
LinuxLinux
  • 5.13.2 to before 5.13.5Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.