{"id":"CVE-2026-89903","summary":"LoongArch: Do not save/restore percpu base register in rethook trampoline","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: Do not save/restore percpu base register in rethook trampoline\n\nThe rethook trampoline saves $r21 ($u0), the percpu base, into its frame\nat entry and restores it at exit. Inbetween rethook_trampoline_handler()\nmay schedule via preempt_enable_notrace().\n\nIf the task migrates to another CPU, the frame's $r21 holds the old\nCPU's percpu base, and restoring it poisons $r21 on the new CPU. Until\nthe next user-\u003ekernel transition heals $r21, all this_cpu_*() accesses\n(runqueues, RCU per-CPU data, timer tick programming, FPU ownership)\nhit the wrong CPU's percpu area.\n\nUnder kretprobe-heavy preemptible load this can corrupt scheduler and\ntimer state: scheduling-while-atomic splats, wrong-CPU RCU warnings,\nWARN_ON_ONCE(rq != this_rq()) in nohz_balance_exit_idle(), and CPUs\nparking in the idle loop with the constant timer never re-armed (hard\nlockup). Reproduces on a Loongson-3A6000 with kretprobes on VFS paths\nplus heavy file churn (OS install / unsquashfs).\n\nBy convention $r21 always holds the current CPU's percpu base in kernel\nmode: SAVE_SOME() at exception entry reloads it only when coming from\nuser mode, and RESTORE_SOME() restores it only when returning to user\nmode; the context-switch path never writes it. Therefore the live $r21\nat trampoline exit is already correct, and nothing inbetween can change\nit legitimately (kernel C code cannot write a global register variable).\nThe same flaw existed even in the pre-rethook kretprobe trampoline since\nv6.3; it was carried over when rethook replaced it. Drop both the save\nand the restore here. Drop the restore is enough to solve the issue, and\ndrop the save is to keep the code tidy and no need to clear it.","modified":"2026-09-17T03:47:19.779250343Z","published":"2026-09-16T10:32:03.038Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/89xxx/CVE-2026-89903.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/266ffc92e68593759adfe3d58f188773d32782c3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8f15e95b438bc6b3c9f23a33c9a0d0678ebd1dc8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a03b5e7483ad2c33ba5dd2adb8552e84bfee8fe2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c048b0a3c0836c4b1bef4b51d355d27090bf6790"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c3f2feace5e4f4b01b68b9f947b19adb4155c32e"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/89xxx/CVE-2026-89903.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-89903"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3f5536860086d906b01ec5ed68cf50c7edcc40af"},{"fixed":"a03b5e7483ad2c33ba5dd2adb8552e84bfee8fe2"},{"fixed":"8f15e95b438bc6b3c9f23a33c9a0d0678ebd1dc8"},{"fixed":"266ffc92e68593759adfe3d58f188773d32782c3"},{"fixed":"c048b0a3c0836c4b1bef4b51d355d27090bf6790"},{"fixed":"c3f2feace5e4f4b01b68b9f947b19adb4155c32e"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-89903.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.3.0"},{"fixed":"6.6.157"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.110"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.51"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.2.5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-89903.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}