[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025050821-CVE-2025-37822-9fef@gregkh>
Date: Thu, 8 May 2025 08:39:31 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2025-37822: riscv: uprobes: Add missing fence.i after building the XOL buffer
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
riscv: uprobes: Add missing fence.i after building the XOL buffer
The XOL (execute out-of-line) buffer is used to single-step the
replaced instruction(s) for uprobes. The RISC-V port was missing a
proper fence.i (i$ flushing) after constructing the XOL buffer, which
can result in incorrect execution of stale/broken instructions.
This was found running the BPF selftests "test_progs:
uprobe_autoattach, attach_probe" on the Spacemit K1/X60, where the
uprobes tests randomly blew up.
The Linux kernel CVE team has assigned CVE-2025-37822 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.12 with commit 74784081aac8a0f3636965fc230e2d3b7cc123c6 and fixed in 6.12.26 with commit bcf6d3158c5902d92b6d62335af4422b7bf7c4e2
Issue introduced in 5.12 with commit 74784081aac8a0f3636965fc230e2d3b7cc123c6 and fixed in 6.14.5 with commit 1dbb95a36499374c51b47ee8ae258a8862c20978
Issue introduced in 5.12 with commit 74784081aac8a0f3636965fc230e2d3b7cc123c6 and fixed in 6.15-rc4 with commit 7d1d19a11cfbfd8bae1d89cc010b2cc397cd0c48
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-37822
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/kernel/probes/uprobes.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/bcf6d3158c5902d92b6d62335af4422b7bf7c4e2
https://git.kernel.org/stable/c/1dbb95a36499374c51b47ee8ae258a8862c20978
https://git.kernel.org/stable/c/7d1d19a11cfbfd8bae1d89cc010b2cc397cd0c48
Powered by blists - more mailing lists