🇰🇷 한글 설명
리눅스 커널의 ACPI PPTT 처리 코드에서 발생한 결함입니다. PPTT 테이블이 시스템에 없는 경우에도 acpi_get_pptt()가 보조 CPU 기동 중 원자적 컨텍스트에서 반복 호출되어, 뮤텍스 대기로 인해 잠들 수 있는 문제가 있었습니다. 이를 수정하여 PPTT가 없음을 한 번 확인한 뒤에는 NULL을 반환하도록 변경했습니다.
💡 쉬운 설명
시스템에 특정 하드웨어 정보 테이블이 없는데도 커널이 계속 그 테이블을 찾으려다 잘못된 시점에 멈추는 버그입니다. 이로 인해 커널 패닉이나 불안정한 동작이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent
Commit 0c80f9e165f8 ("ACPI: PPTT: Leave the table mapped for the runtime usage")
enabled to map PPTT once on the first invocation of acpi_get_pptt() and
never unmapped the same allowing it to be used at runtime with out the
hassle of mapping and unmapping the table. This was needed to fetch LLC
information from the PPTT in the cpuhotplug path which is executed in
the atomic context as the acpi_get_table() might sleep waiting for a
mutex.
However it missed to handle the case when there is no PPTT on the system
which results in acpi_get_pptt() being called from all the secondary
CPUs attempting to fetch the LLC information in the atomic context
without knowing the absence of PPTT resulting in the splat like below:
| BUG: sleeping function called from invalid context at kernel/locking/semaphore.c:164
| in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1
| preempt_count: 1, expected: 0
| RCU nest depth: 0, expected: 0
| no locks held by swapper/1/0.
| irq event stamp: 0
| hardirqs last enabled at (0): 0x0
| hardirqs last disabled at (0): copy_process+0x61c/0x1b40
| softirqs last enabled at (0): copy_process+0x61c/0x1b40
| softirqs last disabled at (0): 0x0
| CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.3.0-rc1 #1
| Call trace:
| dump_backtrace+0xac/0x138
| show_stack+0x30/0x48
| dump_stack_lvl+0x60/0xb0
| dump_stack+0x18/0x28
| __might_resched+0x160/0x270
| __might_sleep+0x58/0xb0
| down_timeout+0x34/0x98
| acpi_os_wait_semaphore+0x7c/0xc0
| acpi_ut_acquire_mutex+0x58/0x108
| acpi_get_table+0x40/0xe8
| acpi_get_pptt+0x48/0xa0
| acpi_get_cache_info+0x38/0x140
| init_cache_level+0xf4/0x118
| detect_cache_attributes+0x2e4/0x640
| update_siblings_masks+0x3c/0x330
| store_cpu_topology+0x88/0xf0
| secondary_start_kernel+0xd0/0x168
| __secondary_switched+0xb8/0xc0
Update acpi_get_pptt() to consider the fact that PPTT is once checked and
is not available on the system and return NULL avoiding any attempts to
fetch PPTT and thereby avoiding any possible sleep waiting for a mutex
in the atomic context.
📍 영향받는 시스템
커널 6.3-rc1 이전의 ACPI 기반 ARM64 계열 Linux 커널 (PPTT 테이블이 없는 시스템)
⚔️ 공격 벡터
원격 공격 경로는 명확하지 않으며, 주로 시스템 안정성(서비스 거부) 문제로 분류됩니다.
🛡️ 대응 방법
사용 중인 배포판의 커널을 이 수정이 포함된 최신 안정 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 이 수정이 반영된 버전(6.3 이후 또는 배포판의 해당 패치 적용 버전)인지 배포판 보안 공지와 대조하여 확인합니다.