🇰🇷 한글 설명
리눅스 커널의 링 버퍼(ring-buffer) 메타데이터 검증 과정에서 서브버퍼 인덱스의 중복 여부를 확인하지 않는 취약점이 발견되었습니다. 이로 인해 중복된 인덱스가 포함될 경우 링 버퍼 연결 리스트가 손상되어 커널 충돌(Crash)이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 메모리를 관리하는 목록에 똑같은 번호가 두 번 들어가는 것을 잡아내지 못하는 오류입니다. 이 오류를 이용하면 시스템이 갑자기 멈추거나 꺼지는 현상이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ring-buffer: Validate the persistent meta data subbuf array
The meta data for a mapped ring buffer contains an array of indexes of all
the subbuffers. The first entry is the reader page, and the rest of the
entries lay out the order of the subbuffers in how the ring buffer link
list is to be created.
The validator currently makes sure that all the entries are within the
range of 0 and nr_subbufs. But it does not check if there are any
duplicates.
While working on the ring buffer, I corrupted this array, where I added
duplicates. The validator did not catch it and created the ring buffer
link list on top of it. Luckily, the corruption was only that the reader
page was also in the writer path and only presented corrupted data but did
not crash the kernel. But if there were duplicates in the writer side,
then it could corrupt the ring buffer link list and cause a crash.
Create a bitmask array with the size of the number of subbuffers. Then
clear it. When walking through the subbuf array checking to see if the
entries are within the range, test if its bit is already set in the
subbuf_mask. If it is, then there is duplicates and fail the validation.
If not, set the corresponding bit and continue.
📍 영향받는 시스템
Linux Kernel (ring-buffer 메타데이터 검증 로직이 포함된 버전)
⚔️ 공격 벡터
메모리 내 링 버퍼 메타데이터의 서브버퍼 인덱스 배열에 중복된 값을 삽입하여 커널 연결 리스트를 손상시킴
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 서브버퍼 인덱스 중복 검증 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 배포판 보안 공지를 통해 확인하십시오.