🇰🇷 한글 설명
Linux 커널의 nfsd 구성 요소에서 follow_down() 함수 호출 중 오류가 발생할 경우, 참조 카운트(mnt_count 및 d_count)를 해제하지 않는 메모리 누수 취약점이 발견되었습니다. 이로 인해 인증된 NFS 클라이언트가 반복적으로 실패한 교차 마운트를 시도할 경우 시스템 자원이 고갈될 수 있습니다.
💡 쉬운 설명
NFS 서버를 사용하는 과정에서 특정 오류가 발생하면 컴퓨터의 메모리 자원이 제대로 반환되지 않고 계속 쌓이는 문제입니다. 이 현상이 반복되면 시스템이 느려지거나 마운트 해제가 되지 않는 등 성능 저하가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfsd: release path refs on follow_down() error
nfsd_cross_mnt() initializes a local struct path with mntget() and
dget() before calling follow_down(). On a negative return the error
arm jumps to out without releasing those references:
err = follow_down(&path, follow_flags);
if (err < 0)
goto out;
follow_down() never drops the caller's entry-time refs on any error
sub-case; for example a pre-cross d_manage() failure leaves path
untouched, so the mntget()/dget() taken on entry survive the call.
Every other early-exit arm in nfsd_cross_mnt() (other-namespace
return, IS_ERR(exp2), and the success tail after the swap) already
calls path_put(&path); the err < 0 arm is the lone omission. The
leak inflates mnt_count and d_count on each failed cross-mount,
blocking umount and pinning dentries against the shrinker, and is
reachable by any authenticated NFS client through nfsd_lookup_dentry
or the NFSv4 READDIR encode path.
Fix by calling path_put(&path) before the goto out in the err < 0
arm so the entry-time refs are released on all follow_down() error
returns.
📍 영향받는 시스템
Linux kernel (nfsd module 사용 환경)
⚔️ 공격 벡터
인증된 NFS 클라이언트를 통한 nfsd_lookup_dentry 또는 NFSv4 READDIR 경로 접근
🛡️ 대응 방법
follow_down() 오류 발생 시 path_put(&path)를 호출하여 참조를 해제하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 보안 패치 버전인지 확인하십시오.