Skip to contentSkip to conversation

CVE-2026-92518: riscv, bpf: Fix kernel stack corruption in tailcall with CFI

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:

riscv, bpf: Fix kernel stack corruption in tailcall with CFI

When CONFIG_CFI_CLANG is enabled, prog->bpf_func already skips the kcfi instruction during setup. Including it again in the tailcall jump offset causes it to jump over an extra 4 bytes, skipping the stack pointer adjustment, which will result in kernel stack corruption.

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

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

	Issue introduced in 6.12 with commit 30a59cc79754fd9ff3f41b7ee2eb21da85988548 and fixed in 6.18.52 with commit 34b1bb33a025787e05f966e74de18cd36276f801
	Issue introduced in 6.12 with commit 30a59cc79754fd9ff3f41b7ee2eb21da85988548 and fixed in 7.2.6 with commit a6e11a81da3420fd37f1518d4f238c4d5784086e
	Issue introduced in 6.12 with commit 30a59cc79754fd9ff3f41b7ee2eb21da85988548 and fixed in 7.3-rc1 with commit 52fb1756ea1d2759dfef2d86245be00b05dac3a2
	Issue introduced in 6.11.6 with commit fe5b68fdcec0f3d97a32f4c4acfef59cf90718f7

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

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:

	arch/riscv/net/bpf_jit_comp64.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/34b1bb33a025787e05f966e74de18cd36276f801
	https://git.kernel.org/stable/c/a6e11a81da3420fd37f1518d4f238c4d5784086e
	https://git.kernel.org/stable/c/52fb1756ea1d2759dfef2d86245be00b05dac3a2