VDB

CVE-2024-49850

CVE-2024-49850 PUBLISHED

bpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos

Reported by linux · Published October 21, 2024

In the Linux kernel, the following vulnerability has been resolved: bpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos In case of malformed relocation record of kind BPF_CORE_TYPE_ID_LOCAL referencing a non-existing BTF type, function bpf_core_calc_relo_insn would cause a null pointer deference. Fix this by adding a proper check upper in call stack, as malformed relocation records could be passed from user space. Simplest reproducer is a program: r0 = 0 exit With a single relocation record: .insn_off = 0, /* patch first instruction */ .type_id = 100500, /* this type id does not exist */ .access_str_off = 6, /* offset of string "0" */ .kind = BPF_CORE_TYPE_ID_LOCAL, See the link for original reproducer or next commit for a test case.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel-develAmazon Linux6.1.115-126.197.amzn2023
python3-perfAmazon Linux6.1.115-126.197.amzn2023
kernel-headersAmazon Linux6.1.115-126.197.amzn2023
kernel-modules-extra-commonAmazon Linux6.1.115-126.197.amzn2023
kernel-libbpfAmazon Linux6.1.115-126.197.amzn2023
kernel-modules-extraAmazon Linux6.1.115-126.197.amzn2023
bpftoolAmazon Linux6.1.115-126.197.amzn2023
perfAmazon Linux6.1.115-126.197.amzn2023
kernel-libbpf-staticAmazon Linux6.1.115-126.197.amzn2023
kernel-toolsAmazon Linux6.1.115-126.197.amzn2023
kernelAmazon Linux6.1.115-126.197.amzn2023

Affected products

VendorProductVersions
LinuxLinux74753e1462e77349525daf9eb60ea21ed92d3a97, 74753e1462e77349525daf9eb60ea21ed92d3a97, 74753e1462e77349525daf9eb60ea21ed92d3a97
LinuxLinux5.17, 0, 6.1.113
amazon:2023kernel-devel0
amazon:2023python3-perf0
amazon:2023kernel-headers0
amazon:2023kernel-modules-extra-common0
amazon:2023kernel-libbpf0
amazon:2023kernel-modules-extra0
amazon:2023bpftool0
amazon:2023perf0
amazon:2023kernel-libbpf-static0
amazon:2023kernel-tools0
amazon:2023kernel0
linuxlinux_kernel5.17, 5.17, 5.17
amazon:2023kernel-libbpf-devel0
amazon:2023kernel-livepatch-6.1.115-126.1970
amazon:2023kernel-tools-devel0
LinuxLinux74753e1462e77349525daf9eb60ea21ed92d3a97, 74753e1462e77349525daf9eb60ea21ed92d3a97, 74753e1462e77349525daf9eb60ea21ed92d3a97

Timeline

  • Oct 21, 2024 CVE Published
  • Oct 22, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 22, 2024 Coalition ESS Score (11 in total, the first dated here)
  • Jan 2, 2026 Security Advisory (434 in total, the first dated here)
  • Apr 29, 2026 Distribution Patch (367 in total, the first dated here)
  • May 11, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-49850
vulnetix vdb fixes CVE-2024-49850

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-49850/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›