🇰🇷 한글 설명
Linux 커널의 nfsd에서 비동기 COPY 작업 시 s2s_cp_stateids IDR 항목이 일시적인 버퍼를 가리키게 되어 발생하는 취약점입니다. 이로 인해 IDR 탐색기가 재사용된 메모리를 참조하게 되어 잘못된 메모리 해제(kfree)를 유발할 수 있습니다.
💡 쉬운 설명
데이터를 복사하는 과정에서 임시로 사용한 메모리 주소를 제대로 정리하지 않아, 시스템이 엉뚱한 메모리 영역을 건드려 오류를 일으키거나 보안 문제가 생길 수 있는 결함입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfsd: fix stale s2s_cp_stateids IDR entry for async COPY
For an async COPY, nfsd4_copy() called nfs4_init_copy_state() before
dup_copy_fields(), so the s2s_cp_stateids IDR was pointed at
&u->copy->cp_stateid -- memory in the per-rqstp COMPOUND buffer that is
reused by the next request. dup_copy_fields() copies only the value into
async_copy, so the IDR slot dangled at the transient buffer for the whole
background copy. Any IDR walker then dereferences reused request memory:
the laundromat reads cs_type from it and, if the bytes look like an
expired NFS4_COPYNOTIFY_STID, follows into
refcount_dec()/idr_remove()/kfree() on garbage; manage_cpntf_state() has
the same exposure via idr_find().
Duplicate the fields first, then register the stateid on the stable
async_copy. result->cb_stateid is unchanged.
📍 영향받는 시스템
Linux Kernel (nfsd 모듈을 사용하는 시스템)
⚔️ 공격 벡터
조작된 NFS4 COPY 요청을 통해 메모리 재사용 시점을 이용한 Use-After-Free 또는 잘못된 메모리 참조 유도
🛡️ 대응 방법
nfsd의 비동기 복사 로직이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인