🔍 CVE-2025-40028

7.8
CVSS Score
HIGH
2025-10-28
2026-10-19 21:10
✅ 완료

🇰🇷 한글 설명

Linux 커널의 binder 드라이버에서 dbitmap 확장 시 메모리 할당에 실패할 경우, 기존 비트맵을 해제한 후 프로세스 종료 시 다시 해제하는 double-free 취약점이 존재합니다. 이 문제는 dbitmap_free() 호출 시 포인터를 NULL로 설정하지 않아 발생하며, 시스템 불안정이나 권한 상승을 초래할 수 있습니다.

💡 쉬운 설명

메모리를 이미 반납했는데 컴퓨터가 실수로 한 번 더 반납하려고 시도하면서 발생하는 오류입니다. 이 과정에서 시스템이 충돌하거나 해커가 시스템 제어권을 얻을 위험이 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: binder: fix double-free in dbitmap A process might fail to allocate a new bitmap when trying to expand its proc->dmap. In that case, dbitmap_grow() fails and frees the old bitmap via dbitmap_free(). However, the driver calls dbitmap_free() again when the same process terminates, leading to a double-free error: ================================================================== BUG: KASAN: double-free in binder_proc_dec_tmpref+0x2e0/0x55c Free of addr ffff00000b7c1420 by task kworker/9:1/209 CPU: 9 UID: 0 PID: 209 Comm: kworker/9:1 Not tainted 6.17.0-rc6-dirty #5 PREEMPT Hardware name: linux,dummy-virt (DT) Workqueue: events binder_deferred_func Call trace: kfree+0x164/0x31c binder_proc_dec_tmpref+0x2e0/0x55c binder_deferred_func+0xc24/0x1120 process_one_work+0x520/0xba4 [...] Allocated by task 448: __kmalloc_noprof+0x178/0x3c0 bitmap_zalloc+0x24/0x30 binder_open+0x14c/0xc10 [...] Freed by task 449: kfree+0x184/0x31c binder_inc_ref_for_node+0xb44/0xe44 binder_transaction+0x29b4/0x7fbc binder_thread_write+0x1708/0x442c binder_ioctl+0x1b50/0x2900 [...] ================================================================== Fix this issue by marking proc->map NULL in dbitmap_free().

📍 영향받는 시스템

Linux kernel (binder driver 포함 버전)

⚔️ 공격 벡터

메모리 할당 실패를 유도하는 특수하게 조작된 Binder IOCTL 호출을 통한 로컬 공격

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하거나, dbitmap_free()에서 proc->map을 NULL로 설정하도록 수정해야 합니다.

🔧 검증 코드

출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인합니다.

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:H/A:H

💻 영향받는 소프트웨어

Linux Kernel