🔍 CVE-2026-31403

7.8
CVSS Score
HIGH
2026-04-03
2026-10-19 19:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 NFSD 모듈에서 /proc/fs/nfs/exports 파일 열기 시 네트워크 네임스페이스에 대한 참조를 유지하지 않아, 네임스페이스 제거 후에도 열린 파일 디스크립터가 이미 해제된 캐시 메모리에 접근하는 사용 후 해제(use-after-free) 취약점입니다. 컨테이너 삭제 후에도 파일 읽기 작업이 해제된 메모리를 참조하여 시스템 크래시나 권한 상승을 야기합니다.

💡 쉬운 설명

NFS 파일 공유 서비스가 열린 파일을 추적할 때 그 파일이 속한 컨테이너/네임스페이스 정보를 잊어버립니다. 컨테이너가 삭제되어도 파일이 열려있으면 이미 없는 메모리를 계속 접근하려고 시도합니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: NFSD: Hold net reference for the lifetime of /proc/fs/nfs/exports fd The /proc/fs/nfs/exports proc entry is created at module init and persists for the module's lifetime. exports_proc_open() captures the caller's current network namespace and stores its svc_export_cache in seq->private, but takes no reference on the namespace. If the namespace is subsequently torn down (e.g. container destruction after the opener does setns() to a different namespace), nfsd_net_exit() calls nfsd_export_shutdown() which frees the cache. Subsequent reads on the still-open fd dereference the freed cache_detail, walking a freed hash table. Hold a reference on the struct net for the lifetime of the open file descriptor. This prevents nfsd_net_exit() from running -- and thus prevents nfsd_export_shutdown() from freeing the cache -- while any exports fd is open. cache_detail already stores its net pointer (cd->net, set by cache_create_net()), so exports_release() can retrieve it without additional per-file storage.

📍 영향받는 시스템

Linux 커널 (NFSD 활성화), 특히 컨테이너/쿠버네티스 환경의 NFS 서버

⚔️ 공격 벡터

컨테이너 내에서 /proc/fs/nfs/exports 파일을 연 후 컨테이너를 제거하고 계속 파일 읽기 수행

🛡️ 대응 방법

Linux 커널 패치 적용 (struct net 참조 유지 개선)

🔧 검증 코드

커널 버전 확인 후 /proc/fs/nfs/exports 파일 존재 여부로 NFSD 활성화 상태 확인. 패치된 버전인지는 배포판 보안 공지 또는 kernel.org에서 확인 필요.

Shell / Script
uname -r && ([ -f /proc/fs/nfs/exports ] && echo 'NFSD enabled' || echo 'NFSD disabled')

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel