CVE-2024-43840: Vulnerability in Linux Linux
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.
AI Analysis
Technical Summary
CVE-2024-43840 is a vulnerability identified in the Linux kernel specifically affecting the BPF (Berkeley Packet Filter) trampoline implementation on the ARM64 architecture. The issue arises when the BPF_TRAMP_F_CALL_ORIG flag is set, causing the trampoline to invoke the __bpf_tramp_enter() and __bpf_tramp_exit() functions with a pointer to a struct bpf_tramp_image passed in register R0. The vulnerability stems from the trampoline generation code using the emit_addr_mov_i64() function to move the bpf_tramp_image address into R0. This function assumes the address resides within the vmalloc() space and thus only handles 48-bit addresses. However, the bpf_tramp_image is allocated via kzalloc(), which can produce addresses exceeding 48 bits on ARM64 systems. Consequently, the trampoline passes an invalid address to the __bpf_tramp_enter/exit() functions, leading to a kernel crash (denial of service). The fix involves replacing emit_addr_mov_i64() with emit_a64_mov_i64(), which correctly handles 64-bit addresses beyond the 48-bit limitation. This vulnerability is a kernel-level flaw that can cause system instability or crashes on affected ARM64 Linux systems utilizing BPF trampolines with the specified flag. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running ARM64-based Linux kernels with BPF trampoline functionality enabled and using the BPF_TRAMP_F_CALL_ORIG flag. The impact is a potential kernel crash leading to denial of service, which can disrupt critical services, especially in environments relying on ARM64 servers or embedded devices. This could affect cloud infrastructure providers, telecom operators, and enterprises using ARM64 Linux servers for networking or security functions leveraging BPF. Although the vulnerability does not directly allow privilege escalation or code execution, the resulting kernel crash can cause service outages, impacting availability and potentially leading to operational disruptions. Organizations with ARM64 Linux deployments in production, particularly those using custom or recent kernel builds with BPF trampoline features, should be aware of this risk. Since no known exploits exist yet, the immediate threat is low, but the potential for future exploitation or accidental crashes necessitates prompt attention.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should: 1) Apply the official Linux kernel patch that replaces emit_addr_mov_i64() with emit_a64_mov_i64() in the BPF trampoline code to ensure proper handling of 64-bit addresses. 2) Update to the latest stable Linux kernel versions where this fix is included, especially on ARM64 systems. 3) Audit and monitor ARM64 Linux systems for kernel crashes or unusual behavior related to BPF trampoline usage. 4) If immediate patching is not feasible, consider disabling or limiting the use of BPF trampolines with the BPF_TRAMP_F_CALL_ORIG flag as a temporary workaround. 5) Coordinate with hardware and software vendors to confirm ARM64 kernel updates are available and deployed in a timely manner. 6) Incorporate this vulnerability into vulnerability management and patching cycles, prioritizing ARM64 Linux hosts in critical infrastructure. These steps go beyond generic advice by focusing on the specific kernel code area and architectural considerations relevant to this flaw.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Norway, Denmark
CVE-2024-43840: Vulnerability in Linux Linux
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.
AI-Powered Analysis
Technical Analysis
CVE-2024-43840 is a vulnerability identified in the Linux kernel specifically affecting the BPF (Berkeley Packet Filter) trampoline implementation on the ARM64 architecture. The issue arises when the BPF_TRAMP_F_CALL_ORIG flag is set, causing the trampoline to invoke the __bpf_tramp_enter() and __bpf_tramp_exit() functions with a pointer to a struct bpf_tramp_image passed in register R0. The vulnerability stems from the trampoline generation code using the emit_addr_mov_i64() function to move the bpf_tramp_image address into R0. This function assumes the address resides within the vmalloc() space and thus only handles 48-bit addresses. However, the bpf_tramp_image is allocated via kzalloc(), which can produce addresses exceeding 48 bits on ARM64 systems. Consequently, the trampoline passes an invalid address to the __bpf_tramp_enter/exit() functions, leading to a kernel crash (denial of service). The fix involves replacing emit_addr_mov_i64() with emit_a64_mov_i64(), which correctly handles 64-bit addresses beyond the 48-bit limitation. This vulnerability is a kernel-level flaw that can cause system instability or crashes on affected ARM64 Linux systems utilizing BPF trampolines with the specified flag. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running ARM64-based Linux kernels with BPF trampoline functionality enabled and using the BPF_TRAMP_F_CALL_ORIG flag. The impact is a potential kernel crash leading to denial of service, which can disrupt critical services, especially in environments relying on ARM64 servers or embedded devices. This could affect cloud infrastructure providers, telecom operators, and enterprises using ARM64 Linux servers for networking or security functions leveraging BPF. Although the vulnerability does not directly allow privilege escalation or code execution, the resulting kernel crash can cause service outages, impacting availability and potentially leading to operational disruptions. Organizations with ARM64 Linux deployments in production, particularly those using custom or recent kernel builds with BPF trampoline features, should be aware of this risk. Since no known exploits exist yet, the immediate threat is low, but the potential for future exploitation or accidental crashes necessitates prompt attention.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should: 1) Apply the official Linux kernel patch that replaces emit_addr_mov_i64() with emit_a64_mov_i64() in the BPF trampoline code to ensure proper handling of 64-bit addresses. 2) Update to the latest stable Linux kernel versions where this fix is included, especially on ARM64 systems. 3) Audit and monitor ARM64 Linux systems for kernel crashes or unusual behavior related to BPF trampoline usage. 4) If immediate patching is not feasible, consider disabling or limiting the use of BPF trampolines with the BPF_TRAMP_F_CALL_ORIG flag as a temporary workaround. 5) Coordinate with hardware and software vendors to confirm ARM64 kernel updates are available and deployed in a timely manner. 6) Incorporate this vulnerability into vulnerability management and patching cycles, prioritizing ARM64 Linux hosts in critical infrastructure. These steps go beyond generic advice by focusing on the specific kernel code area and architectural considerations relevant to this flaw.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-08-17T09:11:59.274Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9828c4522896dcbe2016
Added to database: 5/21/2025, 9:08:56 AM
Last enriched: 7/4/2025, 2:44:46 AM
Last updated: 8/15/2025, 10:33:15 PM
Views: 18
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.