🇰🇷 한글 설명
Linux 커널의 Rust 구현 중 arm64 아키텍처에서 발생한 취약점으로, rustc 버그로 인해 모듈에 uwtable 플래그가 누락되어 발생합니다. 이로 인해 CONFIG_UNWIND_PATCH_PAC_INTO_SCS 설정 시 부팅 과정에서 잘못된 패치 작업이 수행되어 시스템 크래시가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 켜지는 과정에서 특정 소프트웨어 도구의 오류로 인해 시스템이 올바르게 작동하지 못하고 멈춰버리는 문제입니다. 이는 보안 공격보다는 시스템 설정과 컴파일러 간의 충돌로 인해 발생하는 안정성 문제입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
rust: arm64: set uwtable llvm module flag for CONFIG_UNWIND_TABLES
Due to a rustc bug [1] the -Cforce-unwind-tables=y flag only emits the
uwtable annotation for functions, but not for the module. This means
that compiler-generated functions such as 'asan.module_ctor' do not
receive the uwtable annotation.
When CONFIG_UNWIND_PATCH_PAC_INTO_SCS is enabled, this leads to boot
failures because the dwarf information emitted for the kasan
constructors is wrong, which causes the SCS boot patching code to
patch the constructor in an illegal manner. Specifically, the paciasp
instruction is patched, but the autiasp instruction is not. This
mismatch leads to a crash when the constructor is called during boot.
==================================================================
BUG: KASAN: global-out-of-bounds in do_basic_setup+0x4c/0x90
Read of size 8 at addr ffffffe3cc7eb488 by task swapper/0/1
Specifically the faulting instruction is the (*fn)() to invoke the
constructor in do_ctors() of the init/main.c file.
Once the fix lands in rustc, this flag can be made conditional on the
rustc version. Note that passing the flag on a rustc with the fix
present has no effect.
[ The fix [1] has landed for Rust 1.98.0 (expected release on
2026-08-20).
Thus add a version check as discussed.
- Miguel ]
[ Adjusted link and comment. - Miguel ]
📍 영향받는 시스템
arm64 아키텍처 기반의 Linux 커널 (CONFIG_UNWIND_PATCH_PAC_INTO_SCS 활성화 시)
⚔️ 공격 벡터
로컬/물리적 (시스템 부팅 과정에서의 오류이므로 직접적인 원격 공격은 어려움)
🛡️ 대응 방법
Rust 1.98.0 이상의 버전으로 업데이트하거나, 커널 패치를 통해 uwtable 플래그를 조건부로 적용해야 합니다.
🔧 검증 코드
커널 버전과 해당 설정이 'y'로 활성화되어 있는지 확인하여 취약한 환경인지 판단합니다.
uname -a && grep -E 'CONFIG_UNWIND_PATCH_PAC_INTO_SCS' /boot/config-$(uname -r)