🔍 CVE-2025-39817

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

🇰🇷 한글 설명

Linux 커널의 efivarfs 모듈에서 efivarfs_d_compare 함수의 slab-out-of-bounds 취약점입니다. 파일명 길이가 EFI_VARIABLE_GUID_LEN보다 짧을 때 guid 변수가 음수가 되어 메모리 범위 밖의 데이터에 접근하는 문제가 발생합니다. 병렬 조회 중 경합 조건을 통해 트리거됩니다.

💡 쉬운 설명

Linux 커널의 파일 시스템에서 특정 파일 이름으로 동시에 여러 조회를 할 때 메모리 범위를 벗어나 읽을 수 있는 취약점입니다. 이를 통해 시스템 메모리 정보 유출이나 커널 크래시를 유발할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: efivarfs: Fix slab-out-of-bounds in efivarfs_d_compare Observed on kernel 6.6 (present on master as well): BUG: KASAN: slab-out-of-bounds in memcmp+0x98/0xd0 Call trace: kasan_check_range+0xe8/0x190 __asan_loadN+0x1c/0x28 memcmp+0x98/0xd0 efivarfs_d_compare+0x68/0xd8 __d_lookup_rcu_op_compare+0x178/0x218 __d_lookup_rcu+0x1f8/0x228 d_alloc_parallel+0x150/0x648 lookup_open.isra.0+0x5f0/0x8d0 open_last_lookups+0x264/0x828 path_openat+0x130/0x3f8 do_filp_open+0x114/0x248 do_sys_openat2+0x340/0x3c0 __arm64_sys_openat+0x120/0x1a0 If dentry->d_name.len < EFI_VARIABLE_GUID_LEN , 'guid' can become negative, leadings to oob. The issue can be triggered by parallel lookups using invalid filename: T1 T2 lookup_open ->lookup simple_lookup d_add // invalid dentry is added to hash list lookup_open d_alloc_parallel __d_lookup_rcu __d_lookup_rcu_op_compare hlist_bl_for_each_entry_rcu // invalid dentry can be retrieved ->d_compare efivarfs_d_compare // oob Fix it by checking 'guid' before cmp.

📍 영향받는 시스템

Linux kernel 6.6 이상 (커널이 efivarfs 모듈을 포함한 경우)

⚔️ 공격 벡터

로컬 공격자가 병렬 조회를 통해 부적절한 길이의 파일명으로 조작된 efivarfs 조회를 수행

🛡️ 대응 방법

Linux 커널을 최신 버전으로 업그레이드하여 efivarfs_d_compare 함수의 길이 검증 로직 패치 적용

🔧 검증 코드

커널 버전이 6.6 이상이고 efivarfs가 활성화되어 있으면 '잠재적으로 취약' 메시지 출력

Shell / Script
uname -r | grep -E '^6\.[6-9]|^[7-9]\.' && grep -q efivarfs /proc/filesystems && echo 'Potentially vulnerable' || echo 'Not affected'

📊 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