🇰🇷 한글 설명
Linux 커널의 DAMON_RECLAIM 기능에서 damon_ctx 객체 할당 실패 시 NULL 포인터를 역참조하는 취약점이 발견되었습니다. 이로 인해 시스템이 예기치 않게 충돌하거나 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리를 관리하는 기능이 메모리를 빌려오는 데 실패했을 때, 이를 제대로 확인하지 않고 사용하려다 시스템이 멈추는 문제입니다. 아주 드물게 발생하지만 발생 시 시스템 전체에 영향을 줄 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/damon/reclaim: handle ctx allocation failure
Patch series "mm/damon/{reclaim,lru_sort}: handle ctx allocation failures".
DAMON_RECLAIM and DAMON_LRU_SORT could dereference NULL pointers if their
damon_ctx object allocations fail. The bugs are expected to happen
infrequently because the allocations are arguably too small to fail on
common setups. But theoretically they are possible and the consequences
are bad. Fix those.
The issues were discovered [1] by Sashiko.
This patch (of 2):
DAMON_RECLAIM allocates the damon_ctx object for its kdamond in its init
function. damon_reclaim_enabled_store() wrongly assumes the allocation
will always succeed once tried. If the damon_ctx allocation was failed,
therefore, code execution reaches to damon_commit_ctx() while 'ctx' is
NULL. As a result, it dereferences the NULL 'ctx' pointer. Avoid the
NULL dereference by returning -ENOMEM if 'ctx' is NULL.
📍 영향받는 시스템
DAMON(Data Access MONitor) 기능이 활성화된 Linux 커널 버전
⚔️ 공격 벡터
메모리 할당 실패를 유도할 수 있는 특수한 상황을 조성하여 NULL 포인터 역참조 유발
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 패치 적용
🔧 검증 코드
출력된 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인