Skip to contentSkip to conversation

CVE-2026-98048: bpf: don't rewrite bpf_fastcall patterns entered by a jump

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

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: don't rewrite bpf_fastcall patterns entered by a jump

mark_fastcall_pattern_for_call() must ensure that matched "spill; call; fill" instruction series is not interrupted by a jump. Otherwise the rewrite applied by bpf_remove_fastcall_spills_fills() is not sound.

Record the instructions targeted by jumps in insn_aux_data[*].jump_target when the CFG is built and use this flag to stop growing a pattern at such an instruction. Jumps to the first spill are fine.

Note that existing insn_aux_data[*].jmp_point field can't be reused, as it marks subprogram return instructions.

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

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

	Issue introduced in 6.12 with commit 5b5f51bff1b66cedb62b5ba74a1878341204e057 and fixed in 7.2.7 with commit 24adbc2c3bbe3385ce922587e1f8e837a68b3e25
	Issue introduced in 6.12 with commit 5b5f51bff1b66cedb62b5ba74a1878341204e057 and fixed in 7.3-rc2 with commit 0b1c83dc3c4401cd7e846548f62e3caf3d06742e

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-98048

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:
include/linux/bpf_verifier.h
kernel/bpf/cfg.c
kernel/bpf/verifier.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/24adbc2c3bbe3385ce922587e1f8e837a68b3e25
	https://git.kernel.org/stable/c/0b1c83dc3c4401cd7e846548f62e3caf3d06742e