🇰🇷 한글 설명
Linux 커널의 dm-pcache 구성 요소에서 kset_replay() 함수 호출 시 Use-After-Free 및 잘못된 세그먼트 작업이 발생하는 취약점이 발견되었습니다. 만료된 키를 처리하는 과정에서 이미 해제된 메모리에 접근하거나 유효하지 않은 세그먼트 데이터를 조작할 수 있는 결함이 포함되어 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제인 리눅스에서 이미 사용이 끝난 메모리 공간을 다시 사용하려고 시도할 때 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 보안상 취약점이 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dm-pcache: fix use-after-free and invalid seg operations in kset_replay()
In kset_replay, when key->seg_gen is stale (key->seg_gen <
key->cache_pos.cache_seg->gen), cache_key_put(key) is called but then
key->cache_pos.cache_seg is accessed as the argument to cache_seg_get().
This is a use-after-free on the freed key memory. Although mempool
recycled memory is not immediately reclaimed or overwritten in practice,
this is still a potential UAF bug.
Additionally, for expired invalid keys, setting the cache->seg_map bit
and calling cache_seg_get() is unreasonable since the corresponding
segment data is no longer valid.
Fix both issues by moving cache_seg_get() and __set_bit() after the
gen check, so they only execute for valid keys, and using continue to
skip invalid keys.
📍 영향받는 시스템
dm-pcache 모듈을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
특정 조건에서 메모리 관리 로직을 트리거하여 해제된 메모리 영역에 접근하는 방식
🛡️ 대응 방법
dm-pcache의 kset_replay() 함수 내 로직을 수정하여 유효한 키에 대해서만 메모리 접근이 이루어지도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.