CVE-2026-68295: LoongArch: BPF: Zero-extend signed ALU32 div/mod results

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081028-CVE-2026-68295-543c@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

LoongArch: BPF: Zero-extend signed ALU32 div/mod results

ALU32 operations write a 32-bit result and leave the upper 32 bits of
the BPF register zero. The LoongArch JIT sign-extends the result of
signed ALU32 BPF_DIV and BPF_MOD (off=1), so a negative 32-bit quotient
or remainder leaves bits 63:32 set in JITted code while the verifier
and interpreter model those bits as zero.

Keep sign-extension on the operands, which signed divide needs, and
zero-extend the ALU32 result after the divide or modulo instruction,
matching the unsigned ALU32 div/mod paths and every other ALU32
operation in this JIT.

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


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

	Issue introduced in 6.7 with commit 2425c9e002d2a1fdca34261b2fa6713eafef2163 and fixed in 7.1.6 with commit 716cb29dbed4d62e9e108950a1a82bcba4cc2d45
	Issue introduced in 6.7 with commit 2425c9e002d2a1fdca34261b2fa6713eafef2163 and fixed in 7.2-rc5 with commit dacd348b8a993373576fe2ee2d8b114740ba57a6

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-68295
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/loongarch/net/bpf_jit.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/716cb29dbed4d62e9e108950a1a82bcba4cc2d45
	https://git.kernel.org/stable/c/dacd348b8a993373576fe2ee2d8b114740ba57a6
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.