🇰🇷 한글 설명
Linux 커널의 arm64/efi 구성에서 소프트웨어 PAN(Privileged Access Never) 기능 사용 시 커널 메모리 접근 오류가 발생할 수 있는 취약점입니다. EFI 런타임 서비스 호출 중 fpsimd 컨텍스트 관리 코드가 자발적 선점(preemption)을 일으켜 TTBR0_EL1 값이 잘못된 상태로 EFI 코드로 복귀하는 것이 원인입니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제인 리눅스에서 특정 보안 기능이 켜져 있을 때, 시스템 관리 도구가 작동하는 과정에서 메모리 주소를 잘못 읽어 오류가 발생하는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 비정상적으로 종료될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
arm64/efi: Avoid voluntary preemption with efi_mm installed
Gus reports a bad kernel memory access when using software PAN
(CONFIG_ARM64_SW_TTBR0_PAN=y) on a machine with support for EFI runtime
services:
Unable to handle kernel access to user memory outside uaccess routines
at virtual address 00000000f322ff30
Mem abort info:
ESR = 0x0000000096000004
FSC = 0x04: level 0 translation fault
Internal error: Oops: 0000000096000004 [#1] SMP
Workqueue: efi_rts_wq efi_call_rts
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : efi_call_rts+0xd8/0x288
Call trace:
efi_call_rts+0xd8/0x288 (P)
process_one_work+0x178/0x4f8
worker_thread+0x194/0x328
This is because the fpsimd context management code called from
__efi_fpsimd_begin() can preempt voluntarily, returning later to the EFI
code with an incorrect value for TTBR0_EL1 thanks to the deferred mm
switching used by the software PAN implementation.
Since EFI runtime services cannot preempt voluntarily and because the
fpsimd switching code does not rely on the TTBR0_EL1 mappings, simply
reorder the fpsimd switch so that it occurs before we change the
page-table.
📍 영향받는 시스템
Linux kernel (arm64 architecture) with CONFIG_ARM64_SW_TTBR0_PAN=y enabled
⚔️ 공격 벡터
Local (커널 메모리 접근 오류를 유발하는 특정 EFI 런타임 서비스 호출 상황)
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트하십시오.
🔧 검증 코드
출력 결과에 CONFIG_ARM64_SW_TTBR0_PAN=y가 포함되어 있다면 해당 보안 기능이 활성화된 상태입니다.
uname -a && grep CONFIG_ARM64_SW_TTBR0_PAN /boot/config-$(uname -r) 2>/dev/null