🇰🇷 한글 설명
Linux 커널의 ksmbd 모듈에서 단일 바이트 범위에 대한 잠금 확인을 건너뛰는 취약점이 발견되었습니다. check_lock_range() 함수가 시작과 끝 위치가 같을 경우 유효한 범위임에도 불구하고 잠금 검사를 생략하여, 충돌하는 잠금이 있는 상태에서도 데이터 읽기, 쓰기 및 잘라내기 작업이 허용될 수 있습니다.
💡 쉬운 설명
파일의 아주 작은 부분(1바이트)을 수정할 때, 다른 사람이 사용 중인지 확인하는 보안 절차를 건너뛰는 오류입니다. 이로 인해 데이터가 보호받지 못하고 잘못 수정될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: Do not skip lock checks for single-byte ranges
check_lock_range() uses inclusive ranges. Its callers pass the end
offset as start + length - 1, so start == end represents a valid
single-byte range rather than an empty range.
The start == end shortcut therefore skips mandatory byte-range lock
checks for one-byte reads, writes, copychunk operations and one-byte
truncate ranges. A conflicting lock covering that byte is not checked
and the operation is allowed to proceed.
Remove the shortcut. The truncate size == inode->i_size case is already
handled by only calling check_lock_range() when the new size differs
from the current file size.
📍 영향받는 시스템
ksmbd 모듈을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
네트워크를 통해 ksmbd를 사용하는 공격자가 특정 파일의 단일 바이트 범위에 대해 잠금 검사를 우회하는 조작된 요청을 전송
🛡️ 대응 방법
ksmbd의 잠금 범위 확인 로직이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 패치된 최신 버전인지 확인