CVE-2024-49850
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-devel | Amazon Linux | 6.1.115-126.197.amzn2023 |
| python3-perf | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-headers | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-modules-extra-common | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-libbpf | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-modules-extra | Amazon Linux | 6.1.115-126.197.amzn2023 |
| bpftool | Amazon Linux | 6.1.115-126.197.amzn2023 |
| perf | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-libbpf-static | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-tools | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel | Amazon Linux | 6.1.115-126.197.amzn2023 |
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 74753e1462e77349525daf9eb60ea21ed92d3a97, 74753e1462e77349525daf9eb60ea21ed92d3a97, 74753e1462e77349525daf9eb60ea21ed92d3a97 |
| Linux | Linux | 5.17, 0, 6.1.113 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel | 0 |
| linux | linux_kernel | 5.17, 5.17, 5.17 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel-livepatch-6.1.115-126.197 | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| Linux | Linux | 74753e1462e77349525daf9eb60ea21ed92d3a97, 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