🇰🇷 한글 설명
Linux 커널의 net/rds 구성 요소에서 대용량 페이지 사용 시 TCP 스트림이 손상되는 취약점이 발견되었습니다. rds_message_map_pages() 함수가 마지막 페이지의 남은 바이트 수를 고려하지 않고 전체 페이지 크기를 할당하여, RDS 혼잡 맵 범위를 벗어난 데이터가 TCP 스트림에 포함되어 메시지 헤더를 오염시킬 수 있습니다.
💡 쉬운 설명
컴퓨터가 데이터를 보낼 때 실제 데이터보다 더 많은 양을 보내면서 데이터 흐름이 엉키는 문제가 발생했습니다. 이로 인해 데이터가 깨지거나 통신 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/rds: fix tcp stream corruption with large pages
rds_message_map_pages() assigns PAGE_SIZE bytes to every
scatterlist entry, even when total_len ends in a partial page. The RDS
congestion map is defined as 8192 bytes, so on systems with PAGE_SIZE
greater than 8192 the scatterlist maps bytes beyond the end of the
congestion map. RDS-TCP transmits the SG contents according to those
lengths, so the extra bytes become part of the TCP RDS stream and are
interpreted as subsequent RDS message headers, corrupting the stream.
Limit the final scatterlist mapping to the number of bytes remaining.
This has no effect on systems with a 4K page size and allows RDS-TCP to
be used on systems with 16K and larger page sizes.
The RDS selftest, which previously hung on 16K pages, now passes.
📍 영향받는 시스템
Linux kernel (PAGE_SIZE가 8192바이트보다 큰 16K 또는 64K 페이지를 사용하는 시스템)
⚔️ 공격 벡터
특정 페이지 크기를 사용하는 환경에서 RDS-TCP 통신을 통해 데이터 스트림 오염 유도
🛡️ 대응 방법
커널 패치를 적용하여 rds_message_map_pages() 함수가 마지막 scatterlist 매핑 시 남은 바이트 수만큼만 할당하도록 수정
🔧 검증 코드
PAGE_SIZE 결과가 8192보다 크고, 패치된 커널 버전인지 확인
uname -a && getconf PAGE_SIZE