🇰🇷 한글 설명
Linux 커널의 arm64 아키텍처에서 extable 처리 중 레지스터 인덱스를 잘못 추출하는 취약점이 발견되었습니다. ex->type 대신 ex->data에서 값을 추출해야 함에도 불구하고 잘못된 위치에서 데이터를 읽어와 임의의 주소를 참조하거나 레지스터 값을 오염시킬 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 두뇌 역할을 하는 커널이 데이터를 읽어올 때 엉뚱한 위치를 참조하여 시스템이 멈추거나 잘못된 동작을 할 수 있는 오류입니다. 이로 인해 시스템이 갑자기 꺼지거나 보안상 위험한 상태가 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
arm64: extable: fix load_unaligned_zeropad() reg indices
In ex_handler_load_unaligned_zeropad() we erroneously extract the data and
addr register indices from ex->type rather than ex->data. As ex->type will
contain EX_TYPE_LOAD_UNALIGNED_ZEROPAD (i.e. 4):
* We'll always treat X0 as the address register, since EX_DATA_REG_ADDR is
extracted from bits [9:5]. Thus, we may attempt to dereference an
arbitrary address as X0 may hold an arbitrary value.
* We'll always treat X4 as the data register, since EX_DATA_REG_DATA is
extracted from bits [4:0]. Thus we will corrupt X4 and cause arbitrary
behaviour within load_unaligned_zeropad() and its caller.
Fix this by extracting both values from ex->data as originally intended.
On an MTE-enabled QEMU image we are hitting the following crash:
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
Call trace:
fixup_exception+0xc4/0x108
__do_kernel_fault+0x3c/0x268
do_tag_check_fault+0x3c/0x104
do_mem_abort+0x44/0xf4
el1_abort+0x40/0x64
el1h_64_sync_handler+0x60/0xa0
el1h_64_sync+0x7c/0x80
link_path_walk+0x150/0x344
path_openat+0xa0/0x7dc
do_filp_open+0xb8/0x168
do_sys_openat2+0x88/0x17c
__arm64_sys_openat+0x74/0xa0
invoke_syscall+0x48/0x148
el0_svc_common+0xb8/0xf8
do_el0_svc+0x28/0x88
el0_svc+0x24/0x84
el0t_64_sync_handler+0x88/0xec
el0t_64_sync+0x1b4/0x1b8
Code: f8695a69 71007d1f 540000e0 927df12a (f940014a)
📍 영향받는 시스템
arm64 아키텍처를 사용하는 Linux 커널 (MTE 활성화 환경 포함)
⚔️ 공격 벡터
잘못된 레지스터 인덱스 추출을 유도하여 임의의 메모리 주소 참조 및 레지스터 값 오염 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 extable 처리 로직 수정
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.