🇰🇷 한글 설명
Linux 커널의 s390/vfio_ccw 구성 요소에서 CCW 배열의 범위를 벗어난 검사 오류가 발견되었습니다. ccwchain_calc_length() 함수가 최대 허용치인 256개를 초과하여 257번째 요소를 확인하려 시도함으로써 메모리 경계 외 접근이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 명령어를 읽을 때 정해진 개수보다 하나 더 많은 명령어를 읽으려고 시도하여 메모리 오류를 일으킬 수 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 취약점이 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
s390/vfio_ccw: Fix out of bounds check on CCW array
The routine ccwchain_calc_length() counts the number of channel
command words (CCWs) that are chained together in a single channel
program, and rejects anything larger than CCWCHAIN_LEN_MAX (256) CCWs.
The loop itself is "do..while (count < 257)", and while the logic in
is_cpa_within_range() correctly adjusts between the 0-index array of
CCWs and the count of CCWs starting at 1, this means it would look
at a possible 257th CCW before ending the loop and (correctly)
returning an error.
Fix this by restructuring the loop to break as soon as 256 CCWs
(thus indexes 0-255) are examined, without looking at memory
outside the range.
📍 영향받는 시스템
s390 아키텍처를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
조작된 CCW 체인을 통해 커널 메모리의 경계 밖 영역을 참조하도록 유도
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인