🇰🇷 한글 설명
Linux 커널의 NFSv4/flexfiles 구성 요소에서 파일 핸들 버전 개수가 0으로 설정될 경우 발생하는 취약점입니다. 잘못된 값이 할당될 경우 NULL 포인터 역참조를 유발하여 커널 패닉 및 시스템 중단을 일으킬 수 있습니다.
💡 쉬운 설명
파일 정보를 처리하는 과정에서 숫자가 0인 잘못된 데이터를 받았을 때, 시스템이 이를 제대로 걸러내지 못해 컴퓨터가 갑자기 멈추는 문제입니다. 공격자가 조작된 데이터를 보내면 시스템을 강제로 종료시킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
NFSv4/flexfiles: reject zero filehandle version count
ff_layout_alloc_lseg() decodes the filehandle-version array count
from the flexfiles layout body. The value is used as the count for
kzalloc_objs(), and the current code only rejects NULL.
A zero count yields ZERO_SIZE_PTR, which can be stored in
dss_info->fh_versions even though later flexfiles paths assume that at
least one filehandle version exists.
Reject fh_count == 0 before the allocation, matching the existing zero
version_count validation in the flexfiles GETDEVICEINFO parser.
A QEMU/KASAN run with a malformed flexfiles layout hit:
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
RIP: 0010:ff_layout_encode_ff_layoutupdate.isra.0+0x15f/0x750
ff_layout_encode_layoutreturn+0x683/0x970
nfs4_xdr_enc_layoutreturn+0x278/0x3a0
Kernel panic - not syncing: Fatal exception
The patched kernel rejects the malformed layout without KASAN/oops/panic,
and a valid fh_count=1 regression still opens, reads, and unmounts cleanly.
📍 영향받는 시스템
Linux kernel (NFSv4/flexfiles 관련 모듈 사용 시스템)
⚔️ 공격 벡터
조작된 flexfiles 레이아웃 데이터를 포함한 NFSv4 요청을 전송하여 커널 오류 유도
🛡️ 대응 방법
NFSv4 파일 핸들 버전 개수 검증 로직이 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인