Lucene search

K
cvelistLinuxCVELIST:CVE-2024-27020
HistoryMay 01, 2024 - 5:30 a.m.

CVE-2024-27020 netfilter: nf_tables: Fix potential data-race in __nft_expr_type_get()

2024-05-0105:30:15
Linux
www.cve.org
7
linux kernel
netfilter
nf_tables
data-race
vulnerability
list_for_each_entry_rcu
rcu_read_lock

AI Score

7.2

Confidence

High

EPSS

0

Percentile

5.1%

In the Linux kernel, the following vulnerability has been resolved:

netfilter: nf_tables: Fix potential data-race in __nft_expr_type_get()

nft_unregister_expr() can concurrent with __nft_expr_type_get(),
and there is not any protection when iterate over nf_tables_expressions
list in __nft_expr_type_get(). Therefore, there is potential data-race
of nf_tables_expressions list entry.

Use list_for_each_entry_rcu() to iterate over nf_tables_expressions
list in __nft_expr_type_get(), and use rcu_read_lock() in the caller
nft_expr_type_get() to protect the entire type query process.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/netfilter/nf_tables_api.c"
    ],
    "versions": [
      {
        "version": "ef1f7df9170d",
        "lessThan": "939109c0a8e2",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ef1f7df9170d",
        "lessThan": "b38a133d37fa",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ef1f7df9170d",
        "lessThan": "934e66e231cf",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ef1f7df9170d",
        "lessThan": "0b6de00206ad",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ef1f7df9170d",
        "lessThan": "8d56bad42ac4",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ef1f7df9170d",
        "lessThan": "a9ebf340d123",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ef1f7df9170d",
        "lessThan": "01f1a678b05a",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ef1f7df9170d",
        "lessThan": "f969eb84ce48",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/netfilter/nf_tables_api.c"
    ],
    "versions": [
      {
        "version": "3.13",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "3.13",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "4.19.313",
        "lessThanOrEqual": "4.19.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.4.275",
        "lessThanOrEqual": "5.4.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.216",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.157",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.88",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.29",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.8.8",
        "lessThanOrEqual": "6.8.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.9",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]