🇰🇷 한글 설명
Linux 커널의 SELinux 구성 요소에서 security_get_classes() 함수가 정의되지 않은 클래스 값을 처리할 때 NULL 포인터를 반환하는 취약점이 발견되었습니다. 이로 인해 잘못된 클래스 값이 전달될 경우 시스템에서 NULL 역참조가 발생할 수 있습니다.
💡 쉬운 설명
보안 규칙을 관리하는 시스템이 알 수 없는 규칙 번호를 받았을 때, 이를 제대로 처리하지 못하고 시스템 오류를 일으킬 수 있는 문제입니다. 정상적인 설정에서는 문제가 없으나, 잘못된 설정이 입력되면 시스템이 불안정해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
selinux: reject an unclaimed class value in security_get_classes()
security_get_classes() sizes an array by p_classes.nprim and fills it at
value - 1, so a class value the policy never defines leaves a NULL.
sel_make_classes() passes every entry to sel_make_dir(), reaching the same
d_alloc_name() dereference as the permission array. The class symbol table
is allowed to be sparse (policydb_class_isvalid() exists to absorb that),
but this getter builds its own array straight from the hash table and has
no such predicate.
Fail the lookup when a value went unclaimed instead of handing out the
NULL. Conforming policies define every class they declare and are
unaffected.
📍 영향받는 시스템
SELinux가 활성화된 Linux 커널 (패치 적용 전 버전)
⚔️ 공격 벡터
조작된 SELinux 정책을 통해 정의되지 않은 클래스 값을 시스템에 전달하여 NULL 포인터 역참조 유도
🛡️ 대응 방법
SELinux 클래스 값 검증 로직이 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 보안 패치 버전 이후인지 확인