🇰🇷 한글 설명
Linux 커널의 SUNRPC 구성 요소에서 cache_detail 파괴 전 cache_cleaner를 항상 비우지 않아 발생하는 Use-After-Free 취약점입니다. 네트워크 네임스페이스 해제 시 캐시 리스트가 비어있지 않아 작업 취소가 실행되지 않으며, 이로 인해 이미 해제된 메모리에 접근하여 시스템 오류나 권한 상승을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터가 사용이 끝난 메모리 공간을 정리하기 전에, 다른 프로그램이 그 공간을 이미 지워버린 상태에서 접근하려고 할 때 발생하는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 해커가 시스템 제어권을 얻을 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
SUNRPC: always drain cache_cleaner before destroying a cache_detail
sunrpc_destroy_cache_detail() only cancels the global cache_cleaner
delayed_work when cache_list is empty. During per-netns teardown
cache_list is never empty because init_net's caches remain registered,
so the cancel never fires. After unlink, the caller proceeds to
cache_destroy_net() which kfrees the cache_detail while cache_clean()
may still hold a dangling pointer to it. The result is a
use-after-free: cache_dequeue() takes cd->queue_lock on freed memory,
and cache_put() dereferences cd->cache_put as a function pointer from
freed slab.
Drop the list_empty guard so that cancel_delayed_work_sync() always
runs, ensuring any in-flight cache_clean() completes before the
cache_detail is freed. Re-arm the cleaner afterwards if other caches
are still registered.
📍 영향받는 시스템
Linux kernel (SUNRPC 관련 모듈을 사용하는 시스템)
⚔️ 공격 벡터
네트워크 네임스페이스(netns)를 생성하고 해제하는 과정을 반복하여 메모리 오류를 유도하는 로컬 공격
🛡️ 대응 방법
SUNRPC의 cache_detail 파괴 시 cache_cleaner를 강제로 동기화하여 완료하도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 보안 패치 버전인지 확인합니다.