🔍 CVE-2025-38691

5.5
CVSS Score
MEDIUM
2025-09-04
2026-11-05 22:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 pNFS 블록/SCSI 레이아웃에서 버퍼 재할당 시 초기화되지 않은 포인터를 역참조하는 취약점. 많은 익스텐트 처리 중 layoutupdate_pages 배열이 초기화되기 전에 해제 함수에서 접근하여 메모리 손상 및 시스템 불안정을 초래.

💡 쉬운 설명

리눅스 커널이 파일 저장 위치 정보를 인코딩할 때 초기화되지 않은 메모리를 실수로 접근하는 문제입니다. 대용량 파일 작업 중 시스템이 crash될 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: pNFS: Fix uninited ptr deref in block/scsi layout The error occurs on the third attempt to encode extents. When function ext_tree_prepare_commit() reallocates a larger buffer to retry encoding extents, the "layoutupdate_pages" page array is initialized only after the retry loop. But ext_tree_free_commitdata() is called on every iteration and tries to put pages in the array, thus dereferencing uninitialized pointers. An additional problem is that there is no limit on the maximum possible buffer_size. When there are too many extents, the client may create a layoutcommit that is larger than the maximum possible RPC size accepted by the server. During testing, we observed two typical scenarios. First, one memory page for extents is enough when we work with small files, append data to the end of the file, or preallocate extents before writing. But when we fill a new large file without preallocating, the number of extents can be huge, and counting the number of written extents in ext_tree_encode_commit() does not help much. Since this number increases even more between unlocking and locking of ext_tree, the reallocated buffer may not be large enough again and again.

📍 영향받는 시스템

Linux kernel pNFS 클라이언트 (버전 정보는 공개되지 않았으나 ext_tree_prepare_commit() 함수가 포함된 버전)

⚔️ 공격 벡터

로컬 사용자가 대량의 익스텐트가 있는 파일 작업(쓰기, 프리할당)을 반복 수행하여 메모리 손상 트리거

🛡️ 대응 방법

Linux 커널을 최신 버전으로 업데이트하여 pNFS 버퍼 할당 로직 패치 적용

🔧 검증 코드

현재 커널 버전을 확인하고 NFS 클라이언트가 활성화되어 있는지 확인합니다. 최신 커널 버전이 설치되어 있으면 패치가 적용된 것입니다.

Shell / Script
uname -r | grep -E '[0-9]+\.[0-9]+' && cat /proc/fs/nfs/clients 2>/dev/null | head -1

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel