🔍 CVE-2026-64396

8.8
CVSS Score
HIGH
2026-07-25
2026-09-04 14:47
✅ 완료

🇰🇷 한글 설명

Linux 커널의 ksmbd 모듈에서 SMB2_LOCK 지연 잠금 취소 시 struct file_lock의 Use-After-Free(UAF) 취약점이 발견되었습니다. 잠금 대기 중인 작업이 취소되는 과정에서 비동기 작업 리스트에서 제거되기 전에 메모리가 해제되어, 동시에 실행되는 취소 콜백이 이미 해제된 메모리에 접근하게 됩니다.

💡 쉬운 설명

파일을 잠그려는 요청이 취소되는 과정에서 컴퓨터가 이미 삭제한 메모리 정보를 다시 사용하려고 시도하는 오류입니다. 이로 인해 시스템이 충돌하거나 해커가 시스템 권한을 탈취할 위험이 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix UAF of struct file_lock in SMB2_LOCK deferred-lock cancellation When a blocking byte-range lock request is deferred in the FILE_LOCK_DEFERRED path, ksmbd registers the asynchronous work into the connection's async_requests list via setup_async_work(). The cancel callback smb2_remove_blocked_lock() holds a reference to the flock. If the lock waiter is subsequently woken up but the work state is no longer KSMBD_WORK_ACTIVE (e.g., due to a concurrent cancellation), the cleanup path calls locks_free_lock(flock) without dequeuing the work from the async_requests list. Concurrently, smb2_cancel() walks the list under conn->request_lock and invokes the cancel callback, which then dereferences the already freed 'flock'. This leads to a slab-use-after-free inside __wake_up_common. Fix this by restructuring the cleanup logic after the worker returns from ksmbd_vfs_posix_lock_wait(). Move list_del(&smb_lock->llist) and release_async_work(work) to the top of the cleanup block. This guarantees that the async work is completely dequeued and serialized under conn->request_lock before locks_free_lock(flock) is called, rendering the flock unreachable for any concurrent smb2_cancel().

📍 영향받는 시스템

Linux kernel (ksmbd module 사용 환경)

⚔️ 공격 벡터

SMB2 프로토콜을 통해 조작된 잠금 요청 및 취소 시퀀스를 전송하여 메모리 오류 유도

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ksmbd의 잠금 정리 로직 수정 적용

🔧 검증 코드

출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel