Lucene search

K
cve416baaa9-dc9f-4396-8d5f-8c081fb06d67CVE-2024-38574
HistoryJun 19, 2024 - 2:15 p.m.

CVE-2024-38574

2024-06-1914:15:17
416baaa9-dc9f-4396-8d5f-8c081fb06d67
web.nvd.nist.gov
19
linux kernel
libbpf
null-pointer dereference
bpf_object_load_prog
segmentation fault
bpftool

6.5 Medium

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

15.7%

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

libbpf: Prevent null-pointer dereference when prog to load has no BTF

In bpf_objec_load_prog(), there’s no guarantee that obj->btf is non-NULL
when passing it to btf__fd(), and this function does not perform any
check before dereferencing its argument (as bpf_object__btf_fd() used to
do). As a consequence, we get segmentation fault errors in bpftool (for
example) when trying to load programs that come without BTF information.

v2: Keep btf__fd() in the fix instead of reverting to bpf_object__btf_fd().

Affected configurations

Vulners
Node
linuxlinux_kernelRange6.86.8.12
OR
linuxlinux_kernelRange6.9.06.9.3
OR
linuxlinux_kernelRange6.10.06.10-rc1

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "tools/lib/bpf/libbpf.c"
    ],
    "versions": [
      {
        "version": "df7c3f7d3a3d",
        "lessThan": "ef80b59acfa4",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "df7c3f7d3a3d",
        "lessThan": "1fd91360a758",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "df7c3f7d3a3d",
        "lessThan": "9bf48fa19a4b",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "tools/lib/bpf/libbpf.c"
    ],
    "versions": [
      {
        "version": "6.8",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "6.8",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.8.12",
        "lessThanOrEqual": "6.8.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.9.3",
        "lessThanOrEqual": "6.9.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.10-rc1",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

6.5 Medium

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

15.7%