🇰🇷 한글 설명
Linux 커널의 netfs 구성 요소 내 netfs_unbuffered_write() 함수에서 초기화되지 않은 반환 값이 사용되는 취약점이 발견되었습니다. 첫 번째 서브요청 준비에 실패할 경우 ret 변수가 초기화되지 않은 상태로 루프를 빠져나가, CIFS 등을 통해 잘못된 오류 코드가 반환될 수 있습니다.
💡 쉬운 설명
컴퓨터의 데이터를 저장하는 과정에서 오류가 발생했을 때, 실제 원인이 아닌 엉뚱한 오류 메시지를 보여줄 수 있는 문제입니다. 이로 인해 시스템이 데이터 쓰기 상태를 정확히 파악하지 못할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfs: Fix uninitialized return value in netfs_unbuffered_write()
If preparation of the first subrequest fails,
netfs_unbuffered_write() exits its loop before ret is initialized. The
empty-iterator check can do the same.
For synchronous writes, netfs_unbuffered_write_iter_locked() may then
return an unrelated error instead of wreq->error. This is reachable
through CIFS if cifs_prepare_write() fails to reopen the file or obtain
credits.
Initialize ret to 0 so the caller returns wreq->error if no data was
written, or the number of bytes already written otherwise.
Found with Clang's -Wconditional-uninitialized.
📍 영향받는 시스템
Linux kernel (netfs subsystem 사용 시스템, 특히 CIFS를 사용하는 환경)
⚔️ 공격 벡터
CIFS를 통해 파일 쓰기 준비 과정에서 의도적으로 오류를 유발하여 잘못된 반환 값을 유도할 수 있음
🛡️ 대응 방법
netfs_unbuffered_write() 함수 내 ret 변수를 0으로 초기화하는 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인