🇰🇷 한글 설명
Linux 커널의 lockdep 구성 요소에서 __lock_set_class() 함수가 NULL 포인터를 참조하는 취약점이 발견되었습니다. register_lock_class()가 NULL을 반환할 경우 적절한 검사 없이 포인터 연산을 수행하여 메모리 오염 및 시스템 충돌을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 자원을 관리하는 과정에서 잘못된 주소를 참조하여 시스템이 멈추거나 오류가 발생하는 문제입니다. 데이터가 있어야 할 자리에 아무것도 없는 상태(NULL)를 확인하지 않고 작업을 진행하려다 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
locking/lockdep: Fix NULL pointer dereference in __lock_set_class()
register_lock_class() can return NULL when the lock class pool is
exhausted, graph_lock() fails, or key validation fails. However,
__lock_set_class() uses the return value directly in pointer arithmetic
without a NULL check:
class = register_lock_class(lock, subclass, 0);
hlock->class_idx = class - lock_classes;
If class is NULL, this computes a wild offset that corrupts
hlock->class_idx. The subsequent reacquire_held_locks() call will
invoke hlock_class() with this corrupted index, leading to a NULL or
out-of-bounds pointer dereference.
Add the missing NULL check, consistent with how __lock_acquire() already
handles this case at the same call site.
📍 영향받는 시스템
Linux Kernel (lockdep 기능이 활성화된 버전)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 커널의 락 클래스 풀을 고갈시켜 NULL 포인터 역참조를 유도할 수 있음
🛡️ 대응 방법
커널 패치를 적용하여 __lock_set_class() 함수 내에 NULL 체크 로직을 추가해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 최신 패치 버전인지 확인합니다.