CVE-2025-71270: LoongArch: Enable exception fixup for specific ADE subcode
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: Enable exception fixup for specific ADE subcode
This patch allows the LoongArch BPF JIT to handle recoverable memory access errors generated by BPF_PROBE_MEM* instructions.
When a BPF program performs memory access operations, the instructions it executes may trigger ADEM exceptions. The kernel’s built-in BPF exception table mechanism (EX_TYPE_BPF) will generate corresponding exception fixup entries in the JIT compilation phase; however, the architecture-specific trap handling function needs to proactively call the common fixup routine to achieve exception recovery.
do_ade(): fix EX_TYPE_BPF memory access exceptions for BPF programs, ensure safe execution.
Relevant test cases: illegal address access tests in module_attach and subprogs_extable of selftests/bpf.
The Linux kernel CVE team has assigned CVE-2025-71270 to this issue.
Affected and fixed versions
===========================
Fixed in 6.1.163 with commit b9d9a221bd14ed4b01d113701976fa376762c544 Fixed in 6.6.124 with commit 73ede654d9daa2ee41bdd17bc62946fc5a0258cb Fixed in 6.12.70 with commit c49a28068363f3dca439aa5fe4d3b1f8159809fe Fixed in 6.18.10 with commit c2ed4f71e9288f21d5c53ff790270758e60fa5f9 Fixed in 6.19 with commit 9bdc1ab5e4ce6f066119018d8f69631a46f9c5a0
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-2025-71270
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/kernel/traps.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/b9d9a221bd14ed4b01d113701976fa376762c544 https://git.kernel.org/stable/c/73ede654d9daa2ee41bdd17bc62946fc5a0258cb https://git.kernel.org/stable/c/c49a28068363f3dca439aa5fe4d3b1f8159809fe https://git.kernel.org/stable/c/c2ed4f71e9288f21d5c53ff790270758e60fa5f9 https://git.kernel.org/stable/c/9bdc1ab5e4ce6f066119018d8f69631a46f9c5a0