🇰🇷 한글 설명
Linux 커널의 xfrm 구성 요소에서 ipcomp_alloc_scratches() 함수가 메모리 할당에 실패할 경우, ipcomp_scratches 변수가 이전의 잘못된 주소를 계속 유지하는 취약점이 발견되었습니다. 이로 인해 ipcomp_free_scratches() 호출 시 존재하지 않는 메모리 영역을 해제하려 시도하여 시스템 경고나 오류가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 메모리를 빌려오려다 실패했는데도, 마치 빌려온 것처럼 옛날 주소를 계속 기억하고 있는 문제입니다. 나중에 이 주소를 정리하려고 할 때 없는 것을 지우려다 보니 시스템에 오류가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xfrm: Update ipcomp_scratches with NULL when freed
Currently if ipcomp_alloc_scratches() fails to allocate memory
ipcomp_scratches holds obsolete address. So when we try to free the
percpu scratches using ipcomp_free_scratches() it tries to vfree non
existent vm area. Described below:
static void * __percpu *ipcomp_alloc_scratches(void)
{
...
scratches = alloc_percpu(void *);
if (!scratches)
return NULL;
ipcomp_scratches does not know about this allocation failure.
Therefore holding the old obsolete address.
...
}
So when we free,
static void ipcomp_free_scratches(void)
{
...
scratches = ipcomp_scratches;
Assigning obsolete address from ipcomp_scratches
if (!scratches)
return;
for_each_possible_cpu(i)
vfree(*per_cpu_ptr(scratches, i));
Trying to free non existent page, causing warning: trying to vfree
existent vm area.
...
}
Fix this breakage by updating ipcomp_scrtches with NULL when scratches
is freed
📍 영향받는 시스템
Linux Kernel (xfrm/ipcomp 관련 모듈 사용 시스템)
⚔️ 공격 벡터
메모리 할당 실패를 유도하여 시스템 오류 또는 커널 경고를 발생시키는 방식 (DoS 가능성)
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.