🇰🇷 한글 설명
Linux 커널 ksmbd에서 세션 해제와 동시 참조 시 채널이 남아 연결 객체가 조기에 해제될 수 있는 문제를 수정했습니다. 각 세션 채널마다 연결 참조를 유지하도록 변경되었습니다.
💡 쉬운 설명
파일 공유 서버가 세션을 닫는 순간 다른 작업이 아직 그 연결을 사용하고 있으면 메모리가 너무 일찍 해제되는 문제가 있었습니다. 이를 막기 위해 연결을 사용하는 동안 참조를 유지하도록 고쳤습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: hold a connection reference for each session channel
ksmbd_session_unregister() removes a session from the global and per-
connection tables before dropping the table reference. A concurrent
reference holder can keep the session and its channel list alive after
those removals.
Connection cleanup can no longer find the unpublished session to remove its
channels. Since a channel only stores a raw conn pointer, the connection
can be freed while another session reference holder is still accessing it,
for example during SMB3.1.1 binding or a procfs read.
Take a connection reference when registering a channel and release it on
insertion failure, channel removal, or final session destruction. Keep the
channels and signing keys until the session is destroyed so a response can
still be signed after the session has been unregistered.
📍 영향받는 시스템
ksmbd(커널 내장 SMB 서버)를 사용하는 Linux 커널 수정 전 버전
⚔️ 공격 벡터
인증된 SMB 클라이언트가 세션 바인딩 등을 동시에 수행해 해제된 연결 메모리에 접근하도록 유도하는 방식으로 추정됨
🛡️ 대응 방법
패치된 Linux 커널 버전으로 업데이트하고, 필요 시 ksmbd 모듈을 비활성화하거나 사용하지 않는 경우 제거
🔧 검증 코드
커널 버전이 패치가 포함된 릴리스 이후인지 배포판 보안 공지와 대조하고, ksmbd가 로드되지 않았다면 이 취약점의 영향을 받지 않습니다.
uname -r && (lsmod | grep -i ksmbd || echo 'ksmbd module not loaded')