🇰🇷 한글 설명
Linux 커널의 nfsd 구성 요소에서 비동기 COPY 루프 실행 전 writeback 오류 커서를 샘플링하는 과정에 결함이 발견되었습니다. 이로 인해 동시 작업 중 오류가 발생하더라도 오류를 제대로 감지하지 못해 데이터가 성공적으로 저장된 것으로 잘못 판단될 수 있습니다.
💡 쉬운 설명
파일을 복사하는 도중 오류가 발생했는데도 시스템이 이를 알아차리지 못하고 '성공했다'고 착각하는 문제입니다. 이로 인해 사용자는 데이터가 안전하게 저장되었다고 믿지만 실제로는 데이터가 유실될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfsd: sample writeback error cursor before async COPY loop
_nfsd_copy_file_range() samples dst->f_wb_err into "since"
after the copy loop, then uses it to detect writeback errors
via filemap_check_wb_err() once vfs_fsync_range() returns.
Because the nfsd_file cache reuses a single struct file
across requests targeting the same inode, a concurrent
COMMIT or stable WRITE on dst advances dst->f_wb_err to the
current mapping->wb_err via file_check_and_advance_wb_err()
during its own vfs_fsync_range(). If that advancement lands
between the writeback error appearing in mapping->wb_err
and the COPY worker sampling "since", the worker captures
the already-advanced cursor, errseq_check() sees cur ==
since and returns zero, and NFSD4_COPY_F_COMMITTED is set
even though writeback failed. CB_OFFLOAD then encodes
wr_stable_how = FILE_SYNC4, the client treats the copied
data as durable, and the failure becomes silent data loss.
Sample since once at the start of the function. The cursor
then reflects state in effect before this COPY issues any
writes, and filemap_check_wb_err() detects any error that
occurs during the copy regardless of which thread first
observes it. This matches the pattern used by
nfsd_vfs_write() and nfsd4_clone_file_range().
📍 영향받는 시스템
Linux kernel (nfsd module 포함 버전)
⚔️ 공격 벡터
동시성(Concurrency)을 이용한 특정 조건의 쓰기 작업 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인하십시오.