🇰🇷 한글 설명
Linux 커널의 nfsd에서 CONFIG_NFSD_V4_2_INTER_SSC가 활성화된 경우, 특정 조건에서 NULL 포인터 역참조가 발생할 수 있는 취약점입니다. 공격자가 조작된 COMPOUND 요청을 보내면 nfsd 커널 스레드에서 NULL 포인터 역참조로 인한 시스템 충돌이 발생할 수 있습니다.
💡 쉬운 설명
해커가 특수하게 만든 명령어를 서버에 보내면, 서버의 핵심 운영체제(커널)가 처리 과정에서 오류를 일으켜 멈추거나 꺼질 수 있는 문제입니다. 이는 서버의 안정성을 해칠 수 있는 보안 약점입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfsd: block non-SAVEFH ops after FOREIGN PUTFH to prevent NULL deref
When CONFIG_NFSD_V4_2_INTER_SSC is enabled, nfsd4_putfh() can return
success with fh_dentry and fh_export both NULL if fh_verify() returns
nfserr_stale and putfh->no_verify is true. The NFSD4_FH_FOREIGN flag
is set, but the compound dispatch loop only uses this flag to bypass
the nfserr_nofilehandle check -- it does not prevent subsequent ops
from running with a NULL fh_dentry.
A remote client can exploit this by crafting a COMPOUND that includes
an inter-SSC COPY (which causes check_if_stalefh_allowed() to set
no_verify=true on the saved PUTFH) with an additional op inserted
between the source PUTFH and SAVEFH. For example, SETATTR calls
fh_want_write() which dereferences fh_export->ex_path.mnt without
calling fh_verify() first, causing a NULL pointer dereference in the
nfsd kthread.
Fix this by gating the dispatch loop: when NFSD4_FH_FOREIGN is set
and fh_dentry is NULL, only OP_SAVEFH (needed for the inter-SSC flow)
and ops with ALLOWED_WITHOUT_FH (which don't need a resolved
filehandle) may proceed. All other ops receive nfserr_stale, per
RFC 7862 Section 15.2.3 which specifies that foreign filehandle
validation is deferred to the consuming operation and NFS4ERR_STALE
returned at that point.
📍 영향받는 시스템
CONFIG_NFSD_V4_2_INTER_SSC 옵션이 활성화된 Linux 커널
⚔️ 공격 벡터
원격의 공격자가 조작된 NFSv4 COMPOUND 요청(inter-SSC COPY 및 중간 연산 삽입)을 전송
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 패치된 버전인지 보안 공지(Advisory)와 대조하여 확인