🇰🇷 한글 설명
Linux 커널의 ksmbd 모듈에서 durable reconnect 성공 후 오류 발생 시 파일 객체의 생명주기가 잘못 관리되는 취약점입니다. 이로 인해 세션 테이블에서 제거되지 않은 파일 객체가 메모리에서 해제되어 Use-After-Free 취약점이 발생할 수 있습니다.
💡 쉬운 설명
파일을 다시 연결하는 과정에서 오류가 발생할 때, 컴퓨터가 이미 사용이 끝난 메모리 공간을 지우지 않고 계속 참조하려고 시도하는 문제입니다. 이로 인해 시스템이 충돌하거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix durable reconnect error path file lifetime
After a durable reconnect succeeds, ksmbd_reopen_durable_fd() republishes
the same ksmbd_file into the session volatile-id table. If smb2_open()
then takes a later error path, cleanup first calls ksmbd_fd_put(work, fp)
and then unconditionally calls ksmbd_put_durable_fd(dh_info.fp).
In this case fp and dh_info.fp are the same object. The first put drops the
reconnect lookup reference, but the final durable put can run
__ksmbd_close_fd(NULL, fp). Because the final close is not session-aware,
it can free the file object without removing the volatile-id entry that was
just published into the session table.
Use the session-aware put for the final reconnect drop when the reconnect
had already succeeded and the error path is cleaning up the republished
file. Earlier reconnect failures, before fp is assigned to dh_info.fp, keep
using the durable-only put path.
📍 영향받는 시스템
Linux kernel ksmbd module (specific versions prior to fix)
⚔️ 공격 벡터
네트워크를 통한 SMB2 프로토콜의 durable reconnect 과정 중 의도적인 오류 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.