CVE-2025-38339: powerpc/bpf: fix JIT code size calculation of bpf trampoline
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.
Security readout for executives and security teams
Plain-English summary
A Linux PowerPC BPF JIT sizing error can underestimate space needed for trampoline code. The supplied assessment rates it high severity because a local, low-privileged user may trigger serious security impact. Exposure requires an affected kernel, PowerPC architecture, and relevant BPF trampoline activity.
Executive priority
Treat as a high-priority PowerPC Linux patching issue, especially on multi-user or untrusted-workload systems. Inventory exposure immediately, then follow supported kernel or distribution updates. Urgency is driven by the high CVSS score and local low-privilege vector, not evidence of active exploitation.
Technical view
The preliminary JIT sizing pass may emit fewer instructions than the final PowerPC BPF trampoline compilation because instruction count depends on image location. This mismatch can bring generated code to the allocation boundary and trigger the kernel overflow warning. The fix makes the sizing pass account for the maximum location-dependent instruction count.
Likely exposure
Prioritize PowerPC systems using kernels identified by the supplied record, including 6.13, 6.15.4, and 6.16. The record's version structure is ambiguous, so confirm exact affected and fixed releases through kernel or distribution guidance. Non-PowerPC systems are outside the described vulnerable component.
Exploitation context
The CVSS vector describes local access, low privileges, low complexity, and no user interaction. The bundle reports no KEV listing and provides no evidence of active exploitation or a public exploit. The precise path from the sizing mismatch to confidentiality, integrity, or availability impact is not documented here.
Researcher notes
The record documents a location-dependent discrepancy between arch_bpf_trampoline_size() and arch_prepare_bpf_trampoline(). The safety check can warn when generated instructions approach the writable image boundary. No CWE, demonstrated corruption, exploitability analysis, or affected-version mapping rationale is supplied, limiting conclusions beyond the stated high-severity assessment.
Mitigation direction
Obtain a vendor-supported kernel update containing the applicable referenced stable fix.
Confirm affected and fixed versions with the Linux kernel or distribution security advisory.
Prioritize shared PowerPC systems where untrusted local users can exercise BPF functionality.
Apply vendor-recommended BPF restrictions temporarily if patching cannot occur promptly.
Validation and detection
Record the running kernel version and confirm the system uses PowerPC architecture.
Compare kernel build provenance against the two referenced stable fix commits.
Review kernel logs for the documented PowerPC BPF trampoline overflow warning.
Recheck vendor guidance after updating and verify the replacement kernel is running.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-38339 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
3Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.