🇰🇷 한글 설명
Linux 커널의 IPC 공유 메모리(shm) 관리 과정에서 고아 세그먼트 정리 작업과 shm_nattch 업데이트 간의 직렬화 문제가 발견되었습니다. shm_may_destroy() 체크가 객체 잠금(lock) 이전에 수행되어, 공유 메모리 세그먼트의 삭제 여부를 결정할 때 레이스 컨디션이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 사용하지 않는 메모리 조각을 정리하는 과정에서, 다른 작업이 메모리를 사용 중인지 제대로 확인하지 못해 오류가 생길 수 있는 문제입니다. 이로 인해 메모리 관리의 일관성이 깨질 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ipc/shm: serialize orphan cleanup with shm_nattch updates
shm_destroy_orphaned() walks the shm idr under shm_ids(ns).rwsem, but that
does not serialize all fields tested by shm_may_destroy(). In particular,
shm_nattch is updated while holding shm_perm.lock, and attach paths can do
that without holding the rwsem.
Do not decide that an orphaned segment is unused before taking the object
lock. Move the shm_may_destroy() check under shm_perm.lock, matching the
other destroy paths, and unlock the segment when it no longer qualifies
for removal.
📍 영향받는 시스템
Linux Kernel (IPC shm 관련 모듈이 포함된 버전)
⚔️ 공격 벡터
로컬 공격자가 공유 메모리 세그먼트의 연결 및 해제 작업을 정밀하게 조작하여 레이스 컨디션을 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인