🇰🇷 한글 설명
Linux 커널의 ksmbd 구성 요소에서 same_client_has_lease() 함수 호출 시 참조 카운트를 적절히 관리하지 않아 발생하는 Use-After-Free 취약점입니다. 잠금(lock)을 해제한 후 포인터를 참조하는 과정에서 동시 작업이 발생할 경우 메모리 오류가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 메모리 관리 과정에서 이미 사용이 끝난 데이터 영역을 다시 사용하려고 할 때 발생하는 오류입니다. 공격자가 이를 악용하면 시스템을 중단시키거나 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix use-after-free in same_client_has_lease()
same_client_has_lease() returns an opinfo pointer from ci->m_op_list
after dropping ci->m_lock without taking a reference.
smb_grant_oplock() then dereferences that pointer in copy_lease() and
when checking breaking_cnt. A concurrent close can remove the old lease
from ci->m_op_list and drop the last reference before the caller uses
the returned pointer, leading to a use-after-free.
Take a reference when same_client_has_lease() selects an existing lease,
drop any previous match while scanning, and release the returned
reference in smb_grant_oplock() after copying the lease state.
📍 영향받는 시스템
Linux kernel (ksmbd module 포함 버전)
⚔️ 공격 벡터
네트워크를 통해 SMB 프로토콜을 사용하는 과정에서 특정 타이밍에 동시 요청을 보내 메모리 오류 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 최신 패치 버전인지 확인