Vulnerability · Published Jul 10, 2025 · Assigned by Linux

CVE-2025-38339powerpc/bpf: fix JIT code size calculation of bpf trampoline

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 5% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.2%top 95.0% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-aws-6.146.14.0-1015.15~24.04.1UBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-azure-6.146.14.0-1014.14~24.04.1UBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2025-38339
Ubuntu:25.10linux-azure-fdeno fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-azure-nvidia-6.146.14.0-1007.7UBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-gcp-6.146.14.0-1018.19~24.04.1UBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-oem-6.146.14.0-1014.14UBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-oracle-6.146.14.0-1015.15~24.04.1UBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2025-38339
Ubuntu:24.04:LTSlinux-riscv-6.146.14.0-34.34.1~24.04.1UBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2025-38339
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2025-38339

Affected products (as reported)

VendorProductVersions
Linux Linux d243b62b7bd3d5314382d3b54e4992226245e936 – before 7833deb95e05bec146414b3a2feb24f025ca27c0d243b62b7bd3d5314382d3b54e4992226245e936 – before 59ba025948be2a92e8bc9ae1cbdaf197660bd508
Linux Linux 6.13

References