🇰🇷 한글 설명
리눅스 커널의 ACPI 버스 구현에서 acpi_get_first_physical_node() 함수가 오래된 장치 포인터를 반환할 수 있는 취약점이 발견되었습니다. 장치가 해제된 후 포인터가 반환되어 get_device()를 호출할 경우 Use-After-Free(UAF) 오류가 발생할 수 있습니다. 이를 해결하기 위해 참조 횟수를 안전하게 관리하는 acpi_bus_get_primary_device() 함수가 도입되었습니다.
💡 쉬운 설명
컴퓨터 부품을 관리하는 소프트웨어에서 이미 사라진 부품의 정보를 잘못 참조하여 시스템 오류를 일으킬 수 있는 문제입니다. 이로 인해 시스템이 멈추거나 보안 문제가 생길 수 있어, 부품 정보를 더 안전하게 가져오도록 수정되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ACPI: bus: Introduce acpi_bus_get_primary_device()
The function used for obtaining the first "physical" device for which
the given ACPI one is the ACPI companion, acpi_get_first_physical_node(),
may return a stale device pointer (mostly in theory) because
acpi_unbind_one() may run as a whole after dropping the ACPI device's
physical_node_lock in acpi_get_first_physical_node() and before it
returns. The last reference to the "physical" device may be dropped
then before the pointer to it is returned to the caller.
If that happens and the acpi_get_first_physical_node() caller invokes
get_device() on the pointer obtained from it, which is done by the
majority of its callers, a use-after-free will occur.
To prepare for addressing this problem, introduce a new function for
getting the first "physical" device associated with the given ACPI one
(the "primary physical device") that will also reference count the
device in question before returning a pointer to it.
Make that new function and acpi_get_first_physical_node() share the
physical node list lookup code.
No intentional functional impact.
📍 영향받는 시스템
Linux Kernel (ACPI bus 관련 모듈 사용 버전)
⚔️ 공격 벡터
특정 ACPI 장치 해제 시점과 물리적 노드 조회 시점 사이의 레이스 컨디션을 이용한 로컬 공격
🛡️ 대응 방법
ACPI 버스 관련 패치가 적용된 최신 리눅스 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인