🔍 CVE-2024-50099

7.3
CVSS Score
HIGH
2024-11-05
2026-08-04 11:21
✅ 완료

🇰🇷 한글 설명

Linux 커널의 arm64 아키텍처에서 uprobe가 LDR(literal) 및 LDRSW(literal) 명령어를 처리할 때 발생하는 취약점입니다. 해당 함수들이 사용자 메모리에 안전하게 접근하지 못해 커널 BUG()를 유발하거나 PAN(Privileged Access Never) 기능과 충돌하여 시스템 패닉을 일으킬 수 있습니다.

💡 쉬운 설명

리눅스 운영체제의 특정 하드웨어(arm64)에서 프로그램의 동작을 추적하는 기능이 잘못된 방식으로 메모리에 접근하여 시스템을 멈추게 할 수 있는 문제입니다. 이로 인해 시스템이 갑자기 꺼지거나 오류가 발생할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: arm64: probes: Remove broken LDR (literal) uprobe support The simulate_ldr_literal() and simulate_ldrsw_literal() functions are unsafe to use for uprobes. Both functions were originally written for use with kprobes, and access memory with plain C accesses. When uprobes was added, these were reused unmodified even though they cannot safely access user memory. There are three key problems: 1) The plain C accesses do not have corresponding extable entries, and thus if they encounter a fault the kernel will treat these as unintentional accesses to user memory, resulting in a BUG() which will kill the kernel thread, and likely lead to further issues (e.g. lockup or panic()). 2) The plain C accesses are subject to HW PAN and SW PAN, and so when either is in use, any attempt to simulate an access to user memory will fault. Thus neither simulate_ldr_literal() nor simulate_ldrsw_literal() can do anything useful when simulating a user instruction on any system with HW PAN or SW PAN. 3) The plain C accesses are privileged, as they run in kernel context, and in practice can access a small range of kernel virtual addresses. The instructions they simulate have a range of +/-1MiB, and since the simulated instructions must itself be a user instructions in the TTBR0 address range, these can address the final 1MiB of the TTBR1 acddress range by wrapping downwards from an address in the first 1MiB of the TTBR0 address range. In contemporary kernels the last 8MiB of TTBR1 address range is reserved, and accesses to this will always fault, meaning this is no worse than (1). Historically, it was theoretically possible for the linear map or vmemmap to spill into the final 8MiB of the TTBR1 address range, but in practice this is extremely unlikely to occur as this would require either: * Having enough physical memory to fill the entire linear map all the way to the final 1MiB of the TTBR1 address range. * Getting unlucky with KASLR randomization of the linear map such that the populated region happens to overlap with the last 1MiB of the TTBR address range. ... and in either case if we were to spill into the final page there would be larger problems as the final page would alias with error pointers. Practically speaking, (1) and (2) are the big issues. Given there have been no reports of problems since the broken code was introduced, it appears that no-one is relying on probing these instructions with uprobes. Avoid these issues by not allowing uprobes on LDR (literal) and LDRSW (literal), limiting the use of simulate_ldr_literal() and simulate_ldrsw_literal() to kprobes. Attempts to place uprobes on LDR (literal) and LDRSW (literal) will be rejected as arm_probe_decode_insn() will return INSN_REJECTED. In future we can consider introducing working uprobes support for these instructions, but this will require more significant work.

📍 영향받는 시스템

arm64 아키텍처를 사용하는 Linux 커널 (패치 적용 전 버전)

⚔️ 공격 벡터

사용자 공간(User-space)에서 특정 LDR 명령어를 대상으로 uprobe를 설정하여 커널 오류 유도

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 해당 명령어에 대한 uprobe 설정을 차단함

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.

Shell / Script
uname -a

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel