🇰🇷 한글 설명
리눅스 커널의 writeback 과정에서 디스크 제거 시 bdi_writeback 객체가 해제된 후에도 타이머가 해당 메모리에 접근하여 발생하는 Use-After-Free 취약점입니다. 이를 해결하기 위해 bdi_writeback의 활성 상태를 확인하고, 인터럽트 환경에서도 안전하도록 잠금 메커니즘을 irqsafe로 변경하였습니다.
💡 쉬운 설명
컴퓨터에서 저장 장치를 갑자기 제거할 때, 시스템이 이미 삭제된 메모리 영역을 다시 사용하려고 시도하면서 오류가 발생하는 문제입니다. 이로 인해 시스템이 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
writeback: avoid use-after-free after removing device
When a disk is removed, bdi_unregister gets called to stop further
writeback and wait for associated delayed work to complete. However,
wb_inode_writeback_end() may schedule bandwidth estimation dwork after
this has completed, which can result in the timer attempting to access the
just freed bdi_writeback.
Fix this by checking if the bdi_writeback is alive, similar to when
scheduling writeback work.
Since this requires wb->work_lock, and wb_inode_writeback_end() may get
called from interrupt, switch wb->work_lock to an irqsafe lock.
📍 영향받는 시스템
Linux Kernel (writeback 관련 모듈 사용 시스템)
⚔️ 공격 벡터
로컬 공격자가 특정 조건에서 디스크를 제거하거나 관련 입출력 작업을 유도하여 메모리 오류 유발
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인