CVE-2024-43840
bpf, arm64: Fix trampoline for BPF_TRAMP_F_CALL_ORIG
Reported by linux · Published August 17, 2024
In the Linux kernel, the following vulnerability has been resolved: bpf, arm64: Fix trampoline for BPF_TRAMP_F_CALL_ORIG When BPF_TRAMP_F_CALL_ORIG is set, the trampoline calls __bpf_tramp_enter() and __bpf_tramp_exit() functions, passing them the struct bpf_tramp_image *im pointer as an argument in R0. The trampoline generation code uses emit_addr_mov_i64() to emit instructions for moving the bpf_tramp_image address into R0, but emit_addr_mov_i64() assumes the address to be in the vmalloc() space and uses only 48 bits. Because bpf_tramp_image is allocated using kzalloc(), its address can use more than 48-bits, in this case the trampoline will pass an invalid address to __bpf_tramp_enter/exit() causing a kernel crash. Fix this by using emit_a64_mov_i64() in place of emit_addr_mov_i64() as it can work with addresses that are greater than 48-bits.
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-libbpf | Amazon Linux | 6.1.140-154.222.amzn2023 |
| kernel-modules-extra | Amazon Linux | 6.1.140-154.222.amzn2023 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | efc9909fdce00a827a37609628223cd45bf95d0b, efc9909fdce00a827a37609628223cd45bf95d0b, efc9909fdce00a827a37609628223cd45bf95d0b |
| Linux | Linux | 6.0, 0, 6.1.140 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| linux | linux_kernel | 6.0, 6.0, 6.0 |
| amazon:2023 | kernel-livepatch-6.1.140-154.222 | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel-tools | 0 |
| Linux | Linux | *, *, * |
| amazon:2023 | kernel-headers | 0 |
Timeline
- Aug 17, 2024 CVE Published
- Aug 18, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (22 in total, the first dated here)
- Jan 5, 2026 Security Advisory (135 in total, the first dated here)
- Mar 30, 2026 Distribution Patch (121 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-43840
vulnetix vdb fixes CVE-2024-43840
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-43840/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart