🇰🇷 한글 설명
Linux 커널의 NFSv4 설정 과정에서 nfs4_server_common_setup() 함수가 실패할 경우, 할당된 delegation_hash_table이 해제되지 않고 메모리 누수가 발생하는 취약점입니다. NFSv4 마운트 시도가 반복적으로 실패할 경우 커널 슬랩 메모리가 무제한으로 소모되어 시스템 자원이 고갈될 수 있습니다.
💡 쉬운 설명
NFS라는 네트워크 저장소를 연결하려다 실패할 때마다 컴퓨터의 메모리가 조금씩 새어나가는 문제입니다. 이 과정이 반복되면 결국 컴퓨터의 메모리가 가득 차서 시스템이 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
NFS: fix delegation_hash_table leak when nfs4_server_common_setup() fails
nfs4_server_common_setup() allocates server->delegation_hash_table
first, but server->destroy - the only path that frees the table via
nfs4_destroy_server() - is not assigned until the very end of the
function. If any intermediate step fails (the is_ds_only_client()
check, nfs4_init_session(), nfs4_get_rootfh(), or nfs_probe_server()),
the function returns with server->destroy still NULL, so the caller's
nfs_free_server() skips the destroy callback and the hash table is
leaked (4 KiB per attempt with the default delegation watermark).
This is trivially reachable from userspace: every failed NFSv4 mount
leaks one allocation. A client that persistently retries a mount that
cannot succeed leaks kernel memory without bound. Observed in
production where a Longhorn backup poller retried mount.nfs4 against
an NFSv3-only server roughly 10 times per second, leaking ~3.4 GiB of
unreclaimable slab (kmalloc-rnd-13-4k) per day; the node accumulated
12 GiB of leaked slab before the source was identified via the
kmem:kmalloc tracepoint (call_site=nfs4_delegation_hash_alloc).
Reproducer:
# server exports NFSv3 only (or export path absent for v4)
while :; do mount -t nfs4 <server>:/missing /mnt; done
# watch SUnreclaim in /proc/meminfo grow 4 KiB per iteration
Free the table on the error paths between the allocation and the
assignment of server->destroy.
📍 영향받는 시스템
NFSv4를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
사용자 공간(Userspace)에서 실패하는 NFSv4 마운트 요청을 지속적으로 반복하여 커널 메모리 고갈 유도
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 패치된 버전인지 보안 공지(Security Advisory)와 대조하여 확인