🇰🇷 한글 설명
Linux 커널의 FUSE 모듈에서 O_TRUNC 옵션으로 파일을 열 때 DAX 작업이 실패하면 filemap_invalidate_lock이 해제되지 않고 누수되는 취약점입니다. 이로 인해 발생한 잠금 누수는 이후 해당 파일에 대한 접근이나 작업 시 시스템이 멈추는 현상을 유발할 수 있습니다.
💡 쉬운 설명
파일을 수정하려고 할 때 특정 오류가 발생하면 시스템이 파일을 잠근 채로 풀어주지 않는 버그입니다. 이 때문에 나중에 해당 파일을 다시 사용하려고 하면 시스템이 응답하지 않고 멈춰버릴 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fuse: fix invalidate lock leak on open O_TRUNC DAX failure
fuse_open() takes filemap_invalidate_lock() for a DAX truncate
(dax_truncate = true) and releases it before the out_inode_unlock
label. But when fuse_dax_break_layouts() fails, the goto
out_inode_unlock skips the unlock and leaks the rwsem, so any later
fault or truncate on the file stalls on the stale lock.
fuse_dax_break_layouts() can fail with -ERESTARTSYS when a signal
interrupts the wait for busy DAX pages to drain:
open("file", O_RDWR | O_TRUNC)
└─ fuse_open()
├─ filemap_invalidate_lock() # dax_truncate
└─ fuse_dax_break_layouts()
└─ dax_break_layout()
└─ wait_page_idle() # TASK_INTERRUPTIBLE
└─ fuse_wait_dax_page() # unlock, schedule, re-lock
└─ signal → -ERESTARTSYS
goto out_inode_unlock # <- lock leaked
Fix this by moving filemap_invalidate_unlock() below the label so
that all error paths release the lock, and rename the label to
out_unlock as it now covers more than just the inode lock.
📍 영향받는 시스템
Linux kernel (FUSE 및 DAX 기능 사용 시)
⚔️ 공격 벡터
로컬 사용자가 특정 조건(시그널 인터럽트 등)을 유도하여 파일 오픈 시 오류를 발생시킴으로써 시스템 리소스를 점유하거나 서비스 거부(DoS) 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.