🇰🇷 한글 설명
Linux 커널의 coresight 플랫폼에서 메모리 할당 실패 시 카운터가 먼저 증가하여 발생하는 취약점입니다. 메모리 할당이 실패하더라도 카운터가 이미 증가해 있어, 정리 과정에서 유효하지 않은 포인터를 참조하게 되어 시스템 패닉(Kernel Panic)을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터가 메모리를 빌려오기도 전에 '빌린 개수'를 먼저 세어버려서 발생하는 문제입니다. 메모리 빌리기에 실패했을 때, 이미 늘어난 개수만큼 잘못된 곳을 확인하려다 컴퓨터가 갑자기 멈추거나 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
coresight: platform: defer connection counter increment until alloc succeeds
coresight_add_out_conn() increments nr_outconns before calling
devm_krealloc_array() and again before devm_kmalloc(). If either
allocation fails, the counter is already bumped while the corresponding
array entry is NULL or uninitialized garbage.
coresight_add_in_conn() has the same problem with nr_inconns and
devm_krealloc_array().
In both cases the probe returns -ENOMEM, which causes
coresight_get_platform_data() to call coresight_release_platform_data()
for cleanup. That function iterates up to nr_outconns (or nr_inconns)
entries and dereferences each pointer unconditionally, hitting the NULL
or garbage entry and panicking instead of failing gracefully.
Fix by moving the counter increments to after all allocations succeed,
so the struct is always consistent on any error path.
📍 영향받는 시스템
Linux Kernel (coresight 관련 모듈을 사용하는 시스템)
⚔️ 공격 벡터
메모리 부족 상황을 유도하여 커널 패닉을 일으키는 DoS(서비스 거부) 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.