🇰🇷 한글 설명
Linux 커널의 nfsd 구성 요소에서 레이아웃 상태 ID 할당 중 경쟁 상태(Race Condition)로 인해 발생하는 취약점입니다. 위임 취소(Delegation Revoke) 과정에서 잠금(Lock) 없이 파일 정보를 읽을 경우 NULL 포인터 참조가 발생하여 시스템이 중단(BUG_ON)될 수 있습니다.
💡 쉬운 설명
두 명의 사용자가 동시에 같은 파일을 다룰 때, 시스템 내부의 처리 순서가 꼬이면서 컴퓨터가 갑자기 멈추거나 오류를 일으킬 수 있는 문제입니다. 특정 조건에서 데이터가 사라지는 순간을 노려 시스템을 마비시킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfsd: fix BUG_ON in nfsd4_alloc_layout_stateid on racing delegation revoke
nfsd4_alloc_layout_stateid reads fp->fi_deleg_file without holding
fi_lock when the parent stateid is a delegation. A concurrent delegation
revoke via the laundromat can clear fi_deleg_file under fi_lock, causing
nfsd_file_get() to return NULL and triggering the BUG_ON.
This race is client-reachable: two NFS clients can trigger it by having
one hold a delegation while another opens the same file to force a
recall. When the first client doesn't respond to the recall, the
laundromat revokes it. A concurrent LAYOUTGET from any client using the
delegation stateid hits the race window.
Fix this by taking fi_lock around the fi_deleg_file read in the
SC_TYPE_DELEG path, matching the locking discipline of the
find_any_file() arm, and replacing the BUG_ON with a graceful error
return that cleans up the partially-initialized layout stateid.
📍 영향받는 시스템
Linux kernel (nfsd 모듈을 사용하는 시스템)
⚔️ 공격 벡터
두 개의 NFS 클라이언트를 이용해 한쪽은 위임을 유지하고 다른 쪽은 파일 열기를 시도하여 레이아웃 요청을 보내는 방식의 경쟁 상태 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 fi_lock 적용 및 BUG_ON 로직을 수정해야 함
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.