🇰🇷 한글 설명
Linux 커널의 SMB 클라이언트에서 reparse_buf_ptr() 함수가 ReparseDataLength를 검사하기 전에 먼저 읽어 발생하는 Use-Before-Check 취약점입니다. 서버가 헤더 크기보다 작은 데이터를 반환할 경우, 데이터 범위를 벗어난 메모리 읽기가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 데이터를 읽을 때, 데이터가 충분한지 확인하기도 전에 데이터의 일부를 먼저 읽으려다 발생하는 오류입니다. 이로 인해 잘못된 메모리 영역을 건드려 시스템에 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix use-before-check of ReparseDataLength in reparse_buf_ptr()
reparse_buf_ptr() reads buf->ReparseDataLength before checking that
count covers the full fixed header:
buf = (struct reparse_data_buffer *)((u8 *)io + off);
len = sizeof(*buf); /* 8 bytes */
rdlen = le16_to_cpu(buf->ReparseDataLength); /* offset 4, 2 bytes */
if (count < len || count < rdlen + len) /* check comes after */
struct reparse_data_buffer has ReparseDataLength at offset 4. If a
server returns OutputCount < 6, the read at offset 4-5 reaches past
the end of the received data. The off+count bounds against iov_len
were already validated, but that does not protect against count being
smaller than sizeof(*buf).
Split the check: verify count >= sizeof(*buf) before reading
ReparseDataLength, then verify count covers the data region.
📍 영향받는 시스템
Linux kernel (SMB client module 포함 버전)
⚔️ 공격 벡터
악의적인 SMB 서버가 조작된(매우 짧은) Reparse 데이터 패킷을 클라이언트에 전송
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인