🇰🇷 한글 설명
Linux 커널의 RDMA/mlx5 드라이버 내 cc_params debugfs에서 스택 범위 외 읽기(out-of-bounds read) 취약점이 발견되었습니다. 특정 부호 있는 정수 형식 지정 시 버퍼 크기를 초과하는 데이터가 생성되어, 메모리의 한 바이트를 초과하여 읽을 수 있는 문제가 있습니다.
💡 쉬운 설명
컴퓨터가 데이터를 저장하는 작은 공간보다 더 긴 숫자를 출력하려고 시도하면서, 허용되지 않은 메모리 영역을 몰래 읽을 수 있는 오류입니다. 이로 인해 시스템의 민감한 정보가 유출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/mlx5: Fix stack out-of-bounds read in cc_params debugfs
get_param() reads a congestion parameter as a u32 but formats it with the
signed "%d" into an 11-byte stack buffer. A value with bit 31 set, such as
0x80000000, renders as "-2147483648\n" whose full length is 12. snprintf()
stores only 11 bytes yet returns 12, so simple_read_from_buffer() treats 12
bytes as valid and reads one byte past lbuf[].
Size the buffer for the widest unsigned decimal, format with "%u" to match
the u32, and use scnprintf() so the length passed to
simple_read_from_buffer() reflects the bytes actually stored.
📍 영향받는 시스템
RDMA/mlx5 드라이버를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
debugfs를 통해 특정 혼잡 제어 파라미터(congestion parameter) 값을 조작하여 메모리 읽기 유도
🛡️ 대응 방법
커널 패치를 적용하여 버퍼 크기를 확장하고, 데이터 형식을 u32에 맞게 %u로 변경하며 scnprintf()를 사용하도록 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 최신 패치 버전인지 확인