Skip to contentSkip to conversation

CVE-2026-93135: bpf: Reject programs with inlined helpers if JIT is not available

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

bpf: Reject programs with inlined helpers if JIT is not available

When an architecture (such as LoongArch, ARM64, and RISC-V) implements bpf_jit_inlines_helper_call(), the verifier skips rewriting the helper call offset (insn->imm) in bpf_do_misc_fixups(). This is because the helper is expected to be inlined by the JIT compiler later. Therefore, insn->imm remains as the raw helper enum ID.

However, if JIT is disabled at runtime (net.core.bpf_jit_enable=0) or if JIT compilation fails dynamically (e.g., due to OOM), the program falls back to the BPF interpreter.

When the interpreter executes (__bpf_call_base + insn->imm) with the unpatched raw ID, it jumps into an invalid address space, triggering an instruction alignment fault or a kernel panic.

Although these helpers have valid C implementations in the kernel, the omission of offset rewriting makes runtime interpreter fallback fatal.

Fix this by setting 'prog->jit_required = 1' when helper call rewriting is skipped for JIT inlining. This ensures that such programs are safely rejected if JIT is not available, preventing the runtime kernel panic.

The Linux kernel CVE team has assigned CVE-2026-93135 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.10 with commit 2ddec2c80b4402c293c7e6e0881cecaaf77e8cec and fixed in 7.2.6 with commit 21c6445366795fa3a89954e1d318e7c8afdef843
	Issue introduced in 6.10 with commit 2ddec2c80b4402c293c7e6e0881cecaaf77e8cec and fixed in 7.3-rc1 with commit f1c27922576edccb99d0257827d09bd05c0304a6

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-93135

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
kernel/bpf/fixups.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/21c6445366795fa3a89954e1d318e7c8afdef843
	https://git.kernel.org/stable/c/f1c27922576edccb99d0257827d09bd05c0304a6