🔍 CVE-2025-39840

7.1
CVSS Score
HIGH
2025-09-19
2026-10-19 21:10
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 audit 모듈 내 audit_compare_dname_path() 함수에서 경계 외 읽기(Out-of-bounds read) 취약점이 발견되었습니다. 루트 디렉토리(/)에 대한 감시와 단일 문자 이름의 fsnotify 이벤트가 결합될 때, 잘못된 인덱스 참조로 인해 메모리 경계를 벗어난 읽기가 발생할 수 있습니다.

💡 쉬운 설명

컴퓨터의 파일 변화를 감시하는 기능에서 특정 조건이 맞으면 시스템의 허용되지 않은 메모리 영역을 읽어버리는 오류가 있습니다. 이로 인해 시스템 정보가 유출되거나 프로그램이 예기치 않게 종료될 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: audit: fix out-of-bounds read in audit_compare_dname_path() When a watch on dir=/ is combined with an fsnotify event for a single-character name directly under / (e.g., creating /a), an out-of-bounds read can occur in audit_compare_dname_path(). The helper parent_len() returns 1 for "/". In audit_compare_dname_path(), when parentlen equals the full path length (1), the code sets p = path + 1 and pathlen = 1 - 1 = 0. The subsequent loop then dereferences p[pathlen - 1] (i.e., p[-1]), causing an out-of-bounds read. Fix this by adding a pathlen > 0 check to the while loop condition to prevent the out-of-bounds access. [PM: subject tweak, sign-off email fixes]

📍 영향받는 시스템

audit 모듈을 사용하는 Linux Kernel (취약한 버전)

⚔️ 공격 벡터

루트 디렉토리(/)에 대한 감시 설정과 단일 문자 파일 생성 이벤트를 조합하여 발생

🛡️ 대응 방법

audit_compare_dname_path() 함수 내 while 루프 조건에 pathlen > 0 체크를 추가한 최신 커널로 업데이트

🔧 검증 코드

현재 실행 중인 커널 버전을 확인하여 보안 패치가 적용된 최신 버전인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel