🇰🇷 한글 설명
Linux 커널의 panasonic-laptop 드라이버에서 SINF 패키지 처리 중 경계 검사 오류로 인한 힙 오버플로우 취약점이 발견되었습니다. 특정 하드웨어 환경에서 패키지 개수와 할당된 메모리 크기가 일치할 때, 마지막 센티넬 값을 기록하는 과정에서 배열 범위를 벗어난 쓰기가 발생합니다.
💡 쉬운 설명
노트북의 특정 정보를 읽어오는 과정에서 메모리 공간을 계산하는 방식에 실수가 있어, 정해진 공간보다 더 많은 데이터를 쓰려고 시도하는 문제입니다. 이로 인해 시스템의 메모리가 오염되어 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
platform/x86: panasonic-laptop: Fix sentinel write past pcc->sinf[]
acpi_pcc_retrieve_biosdata() rejects SINF packages only when
pcc->num_sifr is strictly less than hkey->package.count, then
unconditionally writes a trailing sentinel at
pcc->sinf[hkey->package.count]. But pcc->sinf[] is allocated with
exactly pcc->num_sifr elements (valid indices 0..num_sifr-1), so that
write needs num_sifr strictly greater than package.count to stay in
bounds -- num_sifr == package.count passes the existing check but
still overflows by one element.
This is exactly the case probe()'s existing num_sifr++ workaround
("Some DSDT-s have an off-by-one bug where the SINF package count is
one higher than the SQTY reported value") is written to accommodate:
when a DSDT's SINF package count equals SQTY+1, the workaround makes
num_sifr equal to package.count, which is precisely the boundary that
overflows here. Found via UBSan (array-index-out-of-bounds) on
hardware where HKEY.SQTY returns 37 and HKEY.SINF()'s package has 38
elements: num_sifr becomes 38 after the += 1 workaround, the loop
correctly fills indices 0..37, and the sentinel write then targets
index 38, one past the end -- a silent 4-byte heap overflow on kernels
without CONFIG_UBSAN.
Tightening the rejection check to num_sifr <= package.count would
avoid the overflow but breaks probe() entirely on exactly this
hardware, since num_sifr == package.count is the case the off-by-one
workaround exists to support. Nothing else in the driver reads this
sentinel value back, so simply skip the write when there is no room
for it instead.
📍 영향받는 시스템
panasonic-laptop 드라이버를 사용하는 Linux 커널 기반 시스템
⚔️ 공격 벡터
악의적으로 조작된 ACPI DSDT 테이블을 통해 메모리 오버플로우 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인