{"id":"CVE-2021-47312","state":"PUBLISHED","title":"netfilter: nf_tables: Fix dereference of null pointer flow","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nf_tables: Fix dereference of null pointer flow\n\nIn the case where chain->flags & NFT_CHAIN_HW_OFFLOAD is false then\nnft_flow_rule_create is not called and flow is NULL. The subsequent\nerror handling execution via label err_destroy_flow_rule will lead\nto a null pointer dereference on flow when calling nft_flow_rule_destroy.\nSince the error path to err_destroy_flow_rule has to cater for null\nand non-null flows, only call nft_flow_rule_destroy if flow is non-null\nto fix this issue.\n\nAddresses-Coverity: (\"Explicity null dereference\")","publishedAt":"2024-05-21T14:35:29.963Z","updatedAt":"2026-05-11T13:52:03.687Z","severity":{"score":5.5,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","source":"CISA-ADP"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"09b1f676e2e0bbff67c568672c565c6f31470157","status":"affected","lessThan":"70a5a1950cca02c5cd161bb3846b4d983eed97d3","versionType":"git"},{"version":"3c5e44622011b9ea21bd425875dcccfc9a158f5f","status":"affected","lessThan":"4ca041f919f13783b0b03894783deee00dbca19a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/netfilter/nf_tables_api.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5.13.2","status":"affected","lessThan":"5.13.5","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/netfilter/nf_tables_api.c"]}],"references":["https://git.kernel.org/stable/c/70a5a1950cca02c5cd161bb3846b4d983eed97d3","https://git.kernel.org/stable/c/4ca041f919f13783b0b03894783deee00dbca19a"],"weaknesses":["CWE-476"],"ingestedAt":"2026-10-29T19:49:19.404Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/47xxx/CVE-2021-47312.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47312","state":"PUBLISHED","datePublished":"2024-05-21T14:35:29.963Z","dateUpdated":"2026-05-11T13:52:03.687Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-21T14:28:16.973Z"},"containers":{"cna":{"title":"netfilter: nf_tables: Fix dereference of null pointer flow","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nf_tables: Fix dereference of null pointer flow\n\nIn the case where chain->flags & NFT_CHAIN_HW_OFFLOAD is false then\nnft_flow_rule_create is not called and flow is NULL. The subsequent\nerror handling execution via label err_destroy_flow_rule will lead\nto a null pointer dereference on flow when calling nft_flow_rule_destroy.\nSince the error path to err_destroy_flow_rule has to cater for null\nand non-null flows, only call nft_flow_rule_destroy if flow is non-null\nto fix this issue.\n\nAddresses-Coverity: (\"Explicity null dereference\")"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"09b1f676e2e0bbff67c568672c565c6f31470157","status":"affected","lessThan":"70a5a1950cca02c5cd161bb3846b4d983eed97d3","versionType":"git"},{"version":"3c5e44622011b9ea21bd425875dcccfc9a158f5f","status":"affected","lessThan":"4ca041f919f13783b0b03894783deee00dbca19a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/netfilter/nf_tables_api.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5.13.2","status":"affected","lessThan":"5.13.5","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/netfilter/nf_tables_api.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/70a5a1950cca02c5cd161bb3846b4d983eed97d3"},{"url":"https://git.kernel.org/stable/c/4ca041f919f13783b0b03894783deee00dbca19a"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T13:52:03.687Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13.2","versionEndExcluding":"5.13.5"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-05-29T18:11:18.013824Z","id":"CVE-2021-47312","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-476","type":"CWE","lang":"en","description":"CWE-476 NULL Pointer Dereference"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-05T14:44:02.835Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/70a5a1950cca02c5cd161bb3846b4d983eed97d3","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/4ca041f919f13783b0b03894783deee00dbca19a","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T05:32:08.515Z"}}]}}}