Lucene search

K
cvelistLinuxCVELIST:CVE-2024-40909
HistoryJul 12, 2024 - 12:20 p.m.

CVE-2024-40909 bpf: Fix a potential use-after-free in bpf_link_free()

2024-07-1212:20:48
Linux
www.cve.org
6
cve-2024-40909
linux kernel
use-after-free fix
bpf
bpf_link_free

EPSS

0

Percentile

5.1%

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

bpf: Fix a potential use-after-free in bpf_link_free()

After commit 1a80dbcb2dba, bpf_link can be freed by
link->ops->dealloc_deferred, but the code still tests and uses
link->ops->dealloc afterward, which leads to a use-after-free as
reported by syzbot. Actually, one of them should be sufficient, so
just call one of them instead of both. Also add a WARN_ON() in case
of any problematic implementation.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "kernel/bpf/syscall.c"
    ],
    "versions": [
      {
        "version": "876941f533e7",
        "lessThan": "91cff53136da",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1a80dbcb2dba",
        "lessThan": "fa97b8fed989",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1a80dbcb2dba",
        "lessThan": "2884dc7d08d9",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "kernel/bpf/syscall.c"
    ],
    "versions": [
      {
        "version": "6.9",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "6.9",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.35",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.9.6",
        "lessThanOrEqual": "6.9.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.10",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

EPSS

0

Percentile

5.1%