VDB

CVE-2024-43840

CVE-2024-43840 PUBLISHED CVSS 7.8 HIGH

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.

PackageEcosystemFixed in
kernel-libbpfAmazon Linux6.1.140-154.222.amzn2023
kernel-modules-extraAmazon Linux6.1.140-154.222.amzn2023

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinuxefc9909fdce00a827a37609628223cd45bf95d0b, efc9909fdce00a827a37609628223cd45bf95d0b, efc9909fdce00a827a37609628223cd45bf95d0b
LinuxLinux6.0, 0, 6.1.140
amazon:2023kernel-libbpf0
amazon:2023kernel-modules-extra0
linuxlinux_kernel6.0, 6.0, 6.0
amazon:2023kernel-livepatch-6.1.140-154.2220
amazon:2023kernel-libbpf-devel0
amazon:2023kernel-devel0
amazon:2023perf0
amazon:2023kernel-modules-extra-common0
amazon:2023kernel-libbpf-static0
amazon:2023bpftool0
amazon:2023kernel0
amazon:2023python3-perf0
amazon:2023kernel-tools-devel0
amazon:2023kernel-tools0
LinuxLinux*, *, *
amazon:2023kernel-headers0

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

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