🇰🇷 한글 설명
Linux 커널의 SMB 클라이언트에서 cifs_queue_oplock_break() 함수가 파일 참조 횟수(refcount)를 부적절하게 증가시켜 메모리 누수를 유발하는 취약점입니다. 응답이 느린 서버와 상호작용할 때 작업 큐잉에 실패하면 참조 횟수가 감소하지 않아, 이후 파일 시스템 언마운트 시 커널 오류가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 파일을 사용한 뒤 '다 썼다'고 표시를 해야 하는데, 특정 상황에서 이 표시를 누락하여 파일이 계속 사용 중인 것으로 착각하는 문제입니다. 이로 인해 파일을 정리하거나 시스템을 종료할 때 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
smb: client: avoid leaking refcount in cifs_queue_oplock_break()
cifs_queue_oplock_break() unconditionally takes a reference on the
target file before queueing cifs_oplock_break(). Only that work item
decreases the reference counter again.
If another oplock break arrives while that work is still queued,
queue_work() will return false and not queue this second work item. As a
result, we will never reach the point to drop the file reference again
and are leaking this reference. This can be triggered when interacting
with a slow-responding server.
As a result, later unmount operations for this file system will fail with
BUG: Dentry ... still in use (1) [unmount of cifs cifs]
VFS: Busy inodes after unmount of cifs (cifs)
kernel BUG at fs/super.c:777!
Fix this by only incrementing the reference count if the work has been
queued successfully. Taking it after queue_work() is safe because all
three callers hold tcon->open_file_lock across the call and
_cifsFileInfo_put() decrements under that same lock, so a worker that
starts the handler in the window cannot drop the reference before it has
been taken.
📍 영향받는 시스템
Linux kernel (SMB/CIFS client module 포함 버전)
⚔️ 공격 벡터
응답이 느린 SMB 서버와의 통신을 유도하여 파일 참조 횟수 누수를 유발 (로컬/네트워크 상호작용)
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.