🇰🇷 한글 설명
Linux 커널의 x86 플랫폼 hp-bioscfg 드라이버에서 패키지 파서가 검증된 요소 개수 대신 잘못된 개수를 전달받는 취약점이 발견되었습니다. 현재는 안전하지만, 향후 짧은 패키지를 허용하도록 변경될 경우 이름 문자열의 길이를 요소 개수로 오인하여 배열 범위를 벗어나는 힙 읽기(Out-of-bounds heap read)가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 설정 정보를 읽어올 때 데이터의 개수를 잘못 계산하여, 정해진 범위를 넘어선 메모리 영역을 읽으려 시도하는 오류입니다. 이로 인해 시스템 정보가 유출되거나 프로그램이 예기치 않게 동작할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
platform/x86: hp-bioscfg: pass validated element count to package parsers
The per-type package parsers are handed the wrong element count.
hp_init_bios_package_attribute() validates obj->package.count and then
calls one of the five hp_populate_*_package_data() wrappers (string,
integer, enumeration, ordered list, password). Each wrapper forwards a
count to its hp_populate_*_elements_from_package() parser, but instead
of forwarding the validated obj->package.count it derives the count
from elements[0]. elements[0] is the NAME field and is always an
ACPI_TYPE_STRING, so reading ->package.count from it in fact reads
->string.length through the union acpi_object. The parsers thus bound
themselves against the length of the name string rather than against
the real number of elements in the package.
This is safe today because hp_init_bios_package_attribute() refuses any
package that has fewer than the type's element count, so a parser only
ever runs on a full package and never reads past it regardless of the
bogus bound.
An upcoming change relaxes that check to accept shorter packages. Once
a parser can receive fewer elements than its per-type count, a bound
taken from the name length no longer reflects the array size, and the
"elem < count" loop conditions and "elem + n >= count" sub-loop guards
read past the end of elements[] - an out-of-bounds heap read.
Forward the validated obj->package.count to every *_package_data()
wrapper so the parsers bound themselves against the real package size.
This does not change behaviour for the packages that enumerate
correctly today and is a prerequisite for accepting shorter packages
safely.
📍 영향받는 시스템
Linux kernel (x86 platform, hp-bioscfg driver)
⚔️ 공격 벡터
조작된 ACPI 패키지 데이터를 통해 잘못된 메모리 경계를 유도하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.