🔍 CVE-2026-89903

7.8
CVSS Score
HIGH
2026-09-16
2026-10-19 09:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 LoongArch 아키텍처에서 rethook 트램펄린이 percpu 베이스 레지스터($r21)를 잘못 저장하고 복구하여 발생하는 취약점입니다. 작업이 다른 CPU로 이동할 경우 잘못된 percpu 베이스 값이 복구되어 스케줄러, 타이머, RCU 등 커널 핵심 데이터가 손상될 수 있습니다.

💡 쉬운 설명

컴퓨터의 핵심 작업이 다른 CPU로 옮겨갈 때, 이전 CPU의 정보를 잘못 가져와서 시스템이 혼란에 빠지는 문제입니다. 이로 인해 시스템이 멈추거나(Lockup) 데이터가 깨지는 심각한 오류가 발생할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: LoongArch: Do not save/restore percpu base register in rethook trampoline The rethook trampoline saves $r21 ($u0), the percpu base, into its frame at entry and restores it at exit. Inbetween rethook_trampoline_handler() may schedule via preempt_enable_notrace(). If the task migrates to another CPU, the frame's $r21 holds the old CPU's percpu base, and restoring it poisons $r21 on the new CPU. Until the next user->kernel transition heals $r21, all this_cpu_*() accesses (runqueues, RCU per-CPU data, timer tick programming, FPU ownership) hit the wrong CPU's percpu area. Under kretprobe-heavy preemptible load this can corrupt scheduler and timer state: scheduling-while-atomic splats, wrong-CPU RCU warnings, WARN_ON_ONCE(rq != this_rq()) in nohz_balance_exit_idle(), and CPUs parking in the idle loop with the constant timer never re-armed (hard lockup). Reproduces on a Loongson-3A6000 with kretprobes on VFS paths plus heavy file churn (OS install / unsquashfs). By convention $r21 always holds the current CPU's percpu base in kernel mode: SAVE_SOME() at exception entry reloads it only when coming from user mode, and RESTORE_SOME() restores it only when returning to user mode; the context-switch path never writes it. Therefore the live $r21 at trampoline exit is already correct, and nothing inbetween can change it legitimately (kernel C code cannot write a global register variable). The same flaw existed even in the pre-rethook kretprobe trampoline since v6.3; it was carried over when rethook replaced it. Drop both the save and the restore here. Drop the restore is enough to solve the issue, and drop the save is to keep the code tidy and no need to clear it.

📍 영향받는 시스템

Linux kernel (LoongArch architecture, v6.3 이상 포함)

⚔️ 공격 벡터

kretprobe를 빈번하게 사용하는 부하 상황에서 CPU 선점(Preemption)을 유도하여 발생

🛡️ 대응 방법

rethook 트램펄린에서 percpu 베이스 레지스터($r21)의 저장 및 복구 로직을 제거한 최신 커널로 업데이트

🔧 검증 코드

출력 결과에 LoongArch 아키텍처가 포함되어 있는지 확인하고, 커널 버전이 취약점이 수정된 패치 버전인지 확인합니다.

Shell / Script
uname -a | grep -i 'LoongArch'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel