🇰🇷 한글 설명
Linux 커널의 drm/amd/display 구성 요소에서 정수 오버플로로 인한 힙 오버플로 취약점이 발견되었습니다. dal_vector_reserve() 함수가 할당 크기를 계산할 때 32비트 산술 연산을 사용하여 값이 작게 변조될 수 있으며, 이로 인해 예상보다 작은 버퍼가 할당될 수 있습니다.
💡 쉬운 설명
컴퓨터가 메모리 공간을 예약할 때 계산 실수로 실제 필요한 것보다 훨씬 작은 공간을 빌리는 문제입니다. 이로 인해 넘쳐흐른 데이터가 다른 데이터를 덮어쓰는 보안 사고가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Use krealloc_array() in dal_vector_reserve()
[Why & How]
dal_vector_reserve() computes the allocation size as
"capacity * vector->struct_size" using uint32_t arithmetic, which can
silently wrap to a small value on overflow. This would cause krealloc to
return a smaller buffer than expected, leading to heap overflows on
subsequent vector appends.
Replace krealloc() with krealloc_array() which performs an internal
overflow check and returns NULL on wrap, preventing the issue.
(cherry picked from commit 37668568641ccc4cc1dbca4923d0a16609dd5707)
📍 영향받는 시스템
AMD 디스플레이 드라이버를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
조작된 벡터 데이터를 전달하여 정수 오버플로를 유도하고 힙 메모리 오버플로를 발생시킴
🛡️ 대응 방법
krealloc_array()를 사용하여 오버플로 검사가 포함된 안전한 메모리 할당 함수로 업데이트된 커널 사용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인