🇰🇷 한글 설명
Linux 커널의 ksmbd 구성 요소에서 oplock(opportunistic lock) 해제 과정 중 동기화 문제가 발생할 수 있습니다. oplock 해제 시도가 진행 중인 상태에서 close 작업이 발생할 경우, 상태 관리가 제대로 이루어지지 않아 잘못된 상태 값이 덮어씌워질 수 있는 취약점입니다.
💡 쉬운 설명
파일을 사용하는 권한을 잠시 빌려오는 기능(oplock)을 해제하는 과정에서, 여러 작업이 동시에 겹칠 때 시스템이 혼란을 겪는 문제입니다. 이로 인해 파일 잠금 상태가 꼬이거나 비정상적인 동작이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: serialize oplock close with pending break ownership
close may abort an in-flight oplock break while another breaker already
holds an opinfo reference. Releasing pending_break wakes that waiter, but
without serializing the close transition with bit acquisition it can become
a new break owner through the test_and_set_bit() fast path. It can then
overwrite OPLOCK_CLOSING with OPLOCK_ACK_WAIT and continue a break for
a dying opinfo.
Make OPLOCK_CLOSING terminal once the opinfo is removed from the inode
list. Serialize that transition, pending_break acquisition, and
OPLOCK_ACK_WAIT setup with an opinfo state lock. A breaker which loses
the race releases its ownership and returns -ENOENT. Explicitly wake
pending_break waiters during close so they can observe the terminal state.
Also prevent ACK and timeout paths from replacing OPLOCK_CLOSING with
OPLOCK_STATE_NONE.
📍 영향받는 시스템
Linux Kernel (ksmbd 모듈을 사용하는 버전)
⚔️ 공격 벡터
네트워크를 통해 ksmbd 서버에 특수하게 조작된 oplock 해제 및 파일 close 요청을 동시에 전송
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인