Vulnerability · Published Aug 17, 2024 · Assigned by Linux
CVE-2024-43840bpf, arm64: Fix trampoline for BPF_TRAMP_F_CALL_ORIG
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 14% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.140-1 | DEBIAN-CVE-2024-43840 |
| Debian:12 | linux | 6.1.140-1 | DSA-5925-1 |
| Debian:13 | linux | 6.10.3-1 | DEBIAN-CVE-2024-43840 |
| Debian:14 | linux | 6.10.3-1 | DEBIAN-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux | 6.8.0-50.51 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1020.22 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1020.22~22.04.1 | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1020.23 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1020.23~22.04.1 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1019.21 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1019.21~22.04.1 | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1015.19 | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1002.4 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-50.51~22.04.1 | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1017.17 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-50.51.1 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-50.51.1~22.04.1 | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1019.21 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1019.21~22.04.1 | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1019.21.1 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1018.18 | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1017.18 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1017.18~22.04.1 | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1016.18 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-50.51.1 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-50.51.1~22.04.1 | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-43840 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-43840 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | efc9909fdce00a827a37609628223cd45bf95d0b – before 077149478497b2f00ff4fd9da2c892defa6418d8efc9909fdce00a827a37609628223cd45bf95d0b – before d9664e6ff040798a46cdc5d401064f55b8676c83efc9909fdce00a827a37609628223cd45bf95d0b – before 6d218fcc707d6b2c3616b6cd24b948fd4825cfecefc9909fdce00a827a37609628223cd45bf95d0b – before 19d3c179a37730caf600a97fed3794feac2b197b |
| Linux | Linux | 6.0 |
References
- https://git.kernel.org/stable/c/077149478497b2f00ff4fd9da2c892defa6418d8
- https://git.kernel.org/stable/c/d9664e6ff040798a46cdc5d401064f55b8676c83
- https://git.kernel.org/stable/c/6d218fcc707d6b2c3616b6cd24b948fd4825cfec
- https://git.kernel.org/stable/c/19d3c179a37730caf600a97fed3794feac2b197b
- https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html