🇰🇷 한글 설명
Linux 커널의 nfsd에서 비동기 COPY 쓰기 작업이 실패할 때 쓰기 검증기(write verifier)를 재설정하지 않는 취약점입니다. 이로 인해 클라이언트는 데이터 쓰기가 실패했음에도 불구하고 데이터가 안전하게 저장되었다고 잘못 판단하여 데이터를 유실할 수 있습니다.
💡 쉬운 설명
파일을 복사하는 과정에서 오류가 발생했는데도 서버가 '성공했다'고 잘못 알려주는 문제입니다. 이 때문에 사용자는 파일이 잘 저장된 줄 알지만, 실제로는 데이터가 사라질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfsd: Reset write verifier when async COPY writeback fails
Async COPY captures nn->writeverf at request time and reports it to
the client via CB_OFFLOAD after the worker kthread completes. When
the post-copy vfs_fsync_range() or filemap_check_wb_err() in
_nfsd_copy_file_range() reports an error, the worker correctly
leaves NFSD4_COPY_F_COMMITTED clear so that CB_OFFLOAD encodes
wr_stable_how as NFS_UNSTABLE, but the server's write verifier is
not rotated.
A client that receives NFS_UNSTABLE in CB_OFFLOAD follows up with
COMMIT to make the copied data durable. With the verifier
unchanged, COMMIT returns the same value the client just received
via CB_OFFLOAD, and the client concludes the copy is durable --
silently dropping the data whose writeback in fact failed. This
violates the UNSTABLE+COMMIT durability contract (RFC 7862 section
15.1, RFC 8881 section 18.32) and matches the bug just fixed in
nfsd_vfs_write() and nfsd_commit().
Rotate nn->writeverf at the writeback-failure site. The async COPY
worker has no svc_rqst, so commit_reset_write_verifier() is not
available here; calling nfsd_reset_write_verifier() directly
mirrors the trace-less reset already used by
nfsd_file_check_write_error() for the same purpose. Filter out
-EAGAIN and -ESTALE, matching commit_reset_write_verifier(), since
neither indicates a durable-storage failure.
📍 영향받는 시스템
Linux kernel (nfsd component)
⚔️ 공격 벡터
비동기 COPY 쓰기 작업 중 발생하는 오류를 이용한 데이터 무결성 파괴 (데이터 유실 유도)
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 nfsd의 쓰기 검증기 재설정 로직을 적용해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.