🇰🇷 한글 설명
리눅스 커널의 regulator: gpio 구성 요소에서 drvdata::gpiods 배열에 대한 경계 외 접근(Out-of-bounds access) 취약점이 발견되었습니다. GPIO 디스크립터 개수가 1보다 클 경우, 할당된 메모리보다 더 많은 데이터를 쓰려고 시도하여 메모리 손상이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 전력을 조절하는 부품이 사용하는 메모리 공간을 실제 필요한 크기보다 작게 예약하여 발생하는 문제입니다. 이로 인해 정해진 범위를 벗어난 데이터를 쓰게 되어 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods
drvdata::gpiods is supposed to hold an array of 'gpio_desc' pointers. But
the memory is allocated for only one pointer. This will lead to
out-of-bounds access later in the code if 'config::ngpios' is > 1. So
fix the code to allocate enough memory to hold 'config::ngpios' of GPIO
descriptors.
While at it, also move the check for memory allocation failure to be below
the allocation to make it more readable.
📍 영향받는 시스템
GPIO 드라이버를 사용하는 리눅스 커널 버전
⚔️ 공격 벡터
로컬 공격자가 특정 GPIO 설정을 조작하여 커널 메모리 오염을 유도하는 방식
🛡️ 대응 방법
해당 취약점이 수정된 최신 리눅스 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인