CVE-2026-64163: test_kprobes: clear kprobes between test runs
Greg Kroah-Hartman <[email protected]>
| Newsgroups | org.kernel.vger.linux-cve-announce |
|---|---|
| Message-ID | <2026071934-CVE-2026-64163-f1a4@gregkh> |
From: Greg Kroah-Hartman <[email protected]> Description =========== In the Linux kernel, the following vulnerability has been resolved: test_kprobes: clear kprobes between test runs Running the kprobes sanity tests twice makes all tests fail and eventually crashes the kernel. [root@martin-riscv-1 ~]# echo 1 > /sys/kernel/debug/kunit/kprobes_test/run ... # Totals: pass:5 fail:0 skip:0 total:5 ok 1 kprobes_test [root@martin-riscv-1 ~]# echo 1 > /sys/kernel/debug/kunit/kprobes_test/run ... # test_kprobe: EXPECTATION FAILED at lib/tests/test_kprobes.c:64 Expected 0 == register_kprobe(&kp), but register_kprobe(&kp) == -22 (0xffffffffffffffea) ... Unable to handle kernel paging request ... The testsuite defines several kprobes and kretprobes as static variables that are preserved across test runs. After register_kprobe and unregister_kprobe, a kprobe contains some leftover data that must be cleared before the kprobe can be registered again. The tests are setting symbol_name to define the probe location. Address and flags must be cleared. The existing code clears some of the probes between subsequent tests, but not between two test runs. The leftover data from a previous test run makes the registrations fail in the next run. Move the cleanups for all kprobes into kprobes_test_init, this function is called before each single test (including the first test of a test run). The Linux kernel CVE team has assigned CVE-2026-64163 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit e44e81c5b90f698025eadceb7eef8661eda117d5 and fixed in 6.6.142 with commit 08d355936fcf70c81c94f9fe7310450b65c53399 Issue introduced in 5.16 with commit e44e81c5b90f698025eadceb7eef8661eda117d5 and fixed in 6.12.92 with commit accc0004c501a9918313142282b094d408af06fb Issue introduced in 5.16 with commit e44e81c5b90f698025eadceb7eef8661eda117d5 and fixed in 6.18.34 with commit 1c24cf1fd67f6702c719ab73499392cb7af956ae Issue introduced in 5.16 with commit e44e81c5b90f698025eadceb7eef8661eda117d5 and fixed in 7.0.11 with commit 96515819d79f356f40da5540968d838ea570fab9 Issue introduced in 5.16 with commit e44e81c5b90f698025eadceb7eef8661eda117d5 and fixed in 7.1 with commit ef5581bb30efb939cc2bf093475c6cc85258e5cd 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-64163 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: lib/tests/test_kprobes.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/08d355936fcf70c81c94f9fe7310450b65c53399 https://git.kernel.org/stable/c/accc0004c501a9918313142282b094d408af06fb https://git.kernel.org/stable/c/1c24cf1fd67f6702c719ab73499392cb7af956ae https://git.kernel.org/stable/c/96515819d79f356f40da5540968d838ea570fab9 https://git.kernel.org/stable/c/ef5581bb30efb939cc2bf093475c6cc85258e5cd