🇰🇷 한글 설명
Linux 커널의 GFS2 파일 시스템에서 gfs2_qd_dealloc 함수 호출 시 Use-After-Free 취약점이 발견되었습니다. RCU 콜백이 실행되기 전에 슈퍼블록 객체가 먼저 해제되어 메모리 오류가 발생할 수 있으며, 이를 해결하기 위해 rcu_barrier()를 추가하여 콜백 완료를 보장하도록 수정되었습니다.
💡 쉬운 설명
파일 시스템을 종료하는 과정에서 컴퓨터가 이미 삭제한 메모리 영역을 다시 사용하려고 시도하여 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 예기치 않게 종료될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
gfs2: fix use-after-free in gfs2_qd_dealloc
gfs2_qd_dealloc(), called as an RCU callback from gfs2_qd_dispose(),
accesses the superblock object sdp through qd->qd_sbd after freeing qd.
It does so to decrement sd_quota_count and wake up sd_kill_wait.
However, by the time the RCU callback runs, gfs2_put_super() may have
already freed sdp via free_sbd(). This can happen when
gfs2_quota_cleanup() is called during unmount: it disposes of quota
objects via call_rcu() and then waits on sd_kill_wait with a 60-second
timeout. If the timeout expires, or if gfs2_gl_hash_clear() triggers
additional qd_put() calls that schedule more RCU callbacks after the
wait completes, gfs2_put_super() will proceed to free the superblock
while RCU callbacks referencing it are still pending.
Add an rcu_barrier() before free_sbd() in gfs2_put_super() to ensure
all pending RCU callbacks (including gfs2_qd_dealloc) have completed
before the superblock is freed.
📍 영향받는 시스템
Linux Kernel (GFS2 파일 시스템을 사용하는 버전)
⚔️ 공격 벡터
로컬 사용자가 파일 시스템 언마운트(unmount) 과정을 유도하여 메모리 오류를 발생시킴
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인