CVE-2021-47312
JSON

5.5medium

netfilter: nf_tables: Fix dereference of null pointer flow

Severity
5.5medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.22% (higher than 13% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
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")

Affected

Product or packageVersionsReported by
Linux Linuxfrom 09b1f676e2e0bbff67c568672c565c6f31470157 before 70a5a1950cca02c5cd161bb3846b4d983eed97d3, from 3c5e44622011b9ea21bd425875dcccfc9a158f5f before 4ca041f919f13783b0b03894783deee00dbca19a, from 5.13.2 before 5.13.5CVE List
linux linux_kernelfrom 5.13.2 before 5.13.5NVD

Classification

CWE-476

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: netfilter: nf_tables: corrige la desreferencia del flujo de puntero null. En el caso de que chain->flags & NFT_CHAIN_HW_OFFLOAD sea falso, no se llama a nft_flow_rule_create y el flujo es NULL. La ejecución posterior del manejo de errores a través de la etiqueta err_destroy_flow_rule dará lugar a una desreferencia del puntero null en el flujo al llamar a nft_flow_rule_destroy. Dado que la ruta de error a err_destroy_flow_rule tiene que atender flujos nulos y no nulos, solo llame a nft_flow_rule_destroy si el flujo no es nulo para solucionar este problema. Direcciones-Cobertura: ("Desreferencia nula explícita")

References

Sources

SourceRecordLicence
CVE ListCVE-2021-47312 changed 2026-05-11CVE Terms of Use
NVDCVE-2021-47312 changed 2026-06-17Public domain