🇰🇷 한글 설명
Linux 커널의 nfsd 구성 요소에서 XDR 버퍼 크기 계산 오류로 인해 발생하는 취약점입니다. 이 오류는 커널 메모리의 경계를 벗어난 쓰기(Out-of-bounds write)를 유발하거나 초기화되지 않은 커널 메모리를 클라이언트에 유출할 수 있습니다.
💡 쉬운 설명
컴퓨터가 데이터를 주고받을 때 필요한 공간을 잘못 계산하여, 정해진 공간보다 더 많은 데이터를 쓰거나 남의 정보를 실수로 보여줄 수 있는 문제입니다. 이로 인해 시스템이 고장 나거나 중요한 정보가 유출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nfsd: fix XDR length calculation in nfsd4_ff_encode_layoutget
The XDR buffer size calculation in nfsd4_ff_encode_layoutget() has
multiple errors that can result in either an out-of-bounds write or
leaking uninitialized kernel memory to the client:
- fh_len doesn't account for XDR padding on the file handle data
- uid and gid lengths use "8 + len" but xdr_encode_opaque() actually
writes "4 + xdr_align_size(len)" bytes
- ds_len omits the flags and stats_collect_hint fields (8 bytes),
while len's header constant overestimates by 8 bytes -- these
partially cancel but leave a net mismatch
The worst case occurs with short strings (e.g. uid=0, gid=0 with an
odd-sized file handle), where the function writes up to 5 bytes past
the reserved XDR buffer. Conversely, when string lengths happen to be
4-byte aligned, the reservation is too large and stale buffer content
is sent to the client.
Fix this by breaking out every encoded field explicitly in the ds_len
calculation, using xdr_align_size() for all variable-length opaque
fields, and correcting the header constants.
📍 영향받는 시스템
Linux Kernel (nfsd 모듈 사용 환경)
⚔️ 공격 벡터
조작된 NFSv4 파일 핸들 요청을 통해 네트워크를 통해 원격 공격 가능
🛡️ 대응 방법
XDR 길이 계산 로직이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 보안 패치가 적용된 최신 버전인지 확인합니다.