CVE-2025-38339

published 10 Jul 2025 · updated 5 Aug 2026

powerpc/bpf: fix JIT code size calculation of bpf trampoline

7.8HighCVSS 7.8EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 59ba025948be2a92e8bc9ae1cbdaf197660bd508 and Kernel 7833deb95e05bec146414b3a2feb24f025ca27c0.

In the Linux kernel, the following vulnerability has been resolved: powerpc/bpf: fix JIT code size calculation of bpf trampoline arch_bpf_trampoline_size() provides JIT size of the BPF trampoline before the buffer for JIT'ing it is allocated. The total number of instructions emitted for BPF trampoline JIT code depends on where the final image is located. So, the size arrived at with the dummy pass in arch_bpf_trampoline_size() can vary from the actual size needed in arch_prepare_bpf_trampoline(). When the instructions accounted in arch_bpf_trampoline_size() is less than the number of instructions emitted during the actual JIT compile of the trampoline, the below warning is produced: WARNING: CPU: 8 PID: 204190 at arch/powerpc/net/bpf_jit_comp.c:981 __arch_prepare_bpf_trampoline.isra.0+0xd2c/0xdcc which is: /* Make sure the trampoline generation logic doesn't overflow */ if (image && WARN_ON_ONCE(&image[ctx->idx] > (u32 *)rw_image_end - BPF_INSN_SAFETY)) { So, during the dummy pass, instead of providing some arbitrary image location, account for maximum possible instructions if and when there is a dependency with image location for JIT'ing.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
LinuxKernel=6.13, >=d243b62b7bd3d5314382d3b54e4992226245e936 <59ba025948be2a92e8bc9ae1cbdaf197660bd508, >=d243b62b7bd3d5314382d3b54e4992226245e936 <7833deb95e05bec146414b3a2feb24f025ca27c059ba025948be2a92e8bc9ae1cbdaf197660bd508, 7833deb95e05bec146414b3a2feb24f025ca27c0

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Kernel, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2025-38339 severity on Zeptric[![CVE-2025-38339](https://zeptric.io/badge/cve/CVE-2025-38339.svg)](https://zeptric.io/cve/CVE-2025-38339)