🇰🇷 한글 설명
리눅스 커널의 parport 구성 요소에서 배열 범위 초과(out-of-bounds) 접근 취약점이 발견되었습니다. 기존에 sprintf를 snprintf로 교체하여 수정하려 했으나, snprintf의 반환값이 실제 출력된 길이가 아닌 버퍼 크기를 반환하여 여전히 길이 계산 오류가 발생할 수 있는 문제가 있었습니다.
💡 쉬운 설명
데이터를 특정 공간에 담을 때, 공간의 크기를 잘못 계산하여 허용된 범위를 넘어서는 데이터가 써지는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
parport: Proper fix for array out-of-bounds access
The recent fix for array out-of-bounds accesses replaced sprintf()
calls blindly with snprintf(). However, since snprintf() returns the
would-be-printed size, not the actually output size, the length
calculation can still go over the given limit.
Use scnprintf() instead of snprintf(), which returns the actually
output letters, for addressing the potential out-of-bounds access
properly.
📍 영향받는 시스템
parport 모듈을 사용하는 리눅스 커널 버전
⚔️ 공격 벡터
조작된 데이터를 통해 parport 관련 함수 호출 시 배열 범위를 넘어서는 메모리 쓰기 유도
🛡️ 대응 방법
scnprintf()를 사용하여 실제 출력된 길이를 정확히 계산하도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.