🇰🇷 한글 설명
Linux 커널의 SMB 클라이언트에서 cifs_try_adding_channels() 함수 실행 중 iface 객체에 대한 Use-After-Free 취약점이 발견되었습니다. 인터페이스 갱신 과정에서 잠금(lock)이 해제된 사이 객체가 메모리에서 해제되어, 이후 반복문에서 해제된 메모리에 접근할 때 시스템 오류나 보안 문제가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 네트워크 연결 정보를 정리하는 도중에, 사용 중인 정보를 갑자기 삭제해버려 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix use-after-free of iface in cifs_try_adding_channels()
cifs_try_adding_channels() iterates ses->iface_list with
list_for_each_entry_safe_from(), which captures the next entry
(niface) under iface_lock. The loop body then drops iface_lock for
the whole duration of cifs_ses_add_channel().
A concurrent interface refresh (SMB3_request_interfaces() ->
parse_server_interfaces()) marks all ifaces inactive and removes and
frees any that are not re-advertised via list_del() + kref_put(),
where release_iface() is a bare kfree(). Since niface typically has
no channel holding a reference, the list reference is its last and it
can be freed inside the unlocked window. On continue, the iterator
advance step then dereferences niface->iface_head.next, and the loop
body reads iface->rdma_capable/is_active, both on freed memory.
Fix this by never keeping an unreferenced list pointer across the
unlocked window. Each channel attempt now re-scans the list from the
head under iface_lock, takes a kref on the selected candidate, and
passes only that referenced candidate to cifs_ses_add_channel().
weight_fulfilled still tracks selection progress, so restarting the
scan preserves the original weighted distribution and the
weight_fulfilled-before-kref_put ordering on the failure path.
Add a per-pass attempts cap so a flapping interface refresh cannot
keep the inner loop spinning within a single tries increment.
📍 영향받는 시스템
Linux Kernel (SMB client module 포함 버전)
⚔️ 공격 벡터
동시적인 SMB 인터페이스 갱신 요청을 유도하여 메모리 해제 후 참조(Use-After-Free) 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인하십시오.