🔍 CVE-2021-47107

9.8
CVSS Score
CRITICAL
2024-03-04
2026-10-14 13:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 NFSD 구성 요소에서 READDIR 명령 처리 시 버퍼 오버플로우 취약점이 발견되었습니다. 클라이언트가 너무 작은 READDIR count 인자를 보낼 경우 버퍼 크기 계산 과정에서 언더플로우가 발생하여 메모리 경계를 넘어 데이터를 쓸 수 있습니다.

💡 쉬운 설명

NFS 서버에 파일을 목록을 요청할 때, 아주 작은 숫자를 보내 서버의 메모리 계산을 방해하는 방식입니다. 이를 통해 공격자는 서버의 메모리 영역을 넘어서 데이터를 써넣어 시스템을 장악할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: NFSD: Fix READDIR buffer overflow If a client sends a READDIR count argument that is too small (say, zero), then the buffer size calculation in the new init_dirlist helper functions results in an underflow, allowing the XDR stream functions to write beyond the actual buffer. This calculation has always been suspect. NFSD has never sanity- checked the READDIR count argument, but the old entry encoders managed the problem correctly. With the commits below, entry encoding changed, exposing the underflow to the pointer arithmetic in xdr_reserve_space(). Modern NFS clients attempt to retrieve as much data as possible for each READDIR request. Also, we have no unit tests that exercise the behavior of READDIR at the lower bound of @count values. Thus this case was missed during testing.

📍 영향받는 시스템

READDIR 함수를 사용하는 NFSD 기능이 포함된 Linux 커널 버전

⚔️ 공격 벡터

조작된 READDIR count 인자를 포함한 NFS 요청을 서버로 전송

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel