🇰🇷 한글 설명
리눅스 커널의 fdt_scan_reserved_mem() 함수에서 예약된 메모리 영역이 설정된 최대치(MAX_RESERVED_REGIONS)를 초과할 경우, 로컬 배열의 범위를 벗어나 데이터를 쓰는 Out-of-Bounds(OOB) 취약점이 존재합니다. 이 문제는 디바이스 트리 내에 너무 많은 동적 예약 메모리 영역이 정의될 때 발생합니다.
💡 쉬운 설명
컴퓨터가 부팅될 때 메모리 공간을 나누는 과정에서, 정해진 칸보다 더 많은 칸을 만들려고 시도하다가 옆 칸의 데이터를 침범하는 오류입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
of: reserved_mem: prevent OOB when too many dynamic regions are defined
On boot, fdt_scan_reserved_mem() saves each dynamically-placed
/reserved-memory subnode into a local array of size
MAX_RESERVED_REGIONS.
If the device tree defines more than MAX_RESERVED_REGIONS
dynamically-placed regions, fdt_scan_reserved_mem() writes past the
end of the local array.
Add a bounds check that logs an error and skips the excess regions,
restoring the original behavior.
📍 영향받는 시스템
Linux Kernel (fdt_scan_reserved_mem 함수를 사용하는 시스템)
⚔️ 공격 벡터
조작된 디바이스 트리(Device Tree)를 통해 과도한 예약 메모리 영역을 정의하여 메모리 오버플로우 유도
🛡️ 대응 방법
커널 패치를 적용하여 예약 메모리 영역의 개수에 대한 경계 검사(Bounds Check) 로직을 활성화
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인