🇰🇷 한글 설명
Linux 커널의 nfsd 구성 요소에서 네트워크 네임스페이스 해제 시 발생하는 NULL 포인터 역참조 취약점입니다. 네트워크 해제 과정에서 nfsd_serv가 먼저 초기화되어, 서비스 스레드가 유효하지 않은 메모리 주소에 접근하여 시스템 충돌을 유발할 수 있습니다.
💡 쉬운 설명
리눅스 서버에서 네트워크 설정을 삭제할 때, 이미 사라진 서비스 정보를 참조하려고 시도하여 시스템이 멈추거나 오류가 발생하는 문제입니다. 서비스가 종료되는 순서가 맞지 않아 발생하는 일종의 타이밍 문제입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfsd: guard nfsd_serv deref in nfsd_file_net_dispose
nfsd_file_net_dispose() is the consumer side of l->freeme: the nfsd
service thread loop calls it to drain entries that the filecache
garbage collector and shrinker append via
nfsd_file_dispose_list_delayed(). During per-net teardown,
nn->nfsd_serv is cleared before the filecache laundrette is shut
down, so the service thread can still run a dispose pass that finds
more than eight entries on l->freeme and dereferences a NULL
svc_serv:
nfsd service thread loop
nfsd_file_net_dispose(nn)
if (!list_empty(&l->freeme)) {
...
svc_wake_up(nn->nfsd_serv); /* nn->nfsd_serv == NULL */
}
The sibling helper nfsd_file_dispose_list_delayed() already documents
this ordering and caches nn->nfsd_serv into a local before testing it
for NULL. nfsd_file_net_dispose() was introduced with the same raw
svc_wake_up(nn->nfsd_serv) call and never picked up the guard.
Fix by loading nn->nfsd_serv into a local svc_serv pointer and only
calling svc_wake_up() when it is non-NULL, matching the pattern in
nfsd_file_dispose_list_delayed().
📍 영향받는 시스템
nfsd(Network File System daemon)를 사용하는 Linux kernel
⚔️ 공격 벡터
로컬 네트워크 네임스페이스를 생성하고 해제하는 과정을 통해 유도 가능 (Local)
🛡️ 대응 방법
nfsd_file_net_dispose 함수 내에서 nfsd_serv를 로컬 포인터로 안전하게 복사하여 NULL 체크를 수행하도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 최신 보안 패치 버전인지 확인합니다.