🇰🇷 한글 설명
Linux 커널의 SELinux에서 클래스 권한 수가 상속된 공통 권한 수보다 적을 경우 발생하는 취약점입니다. 정책 로드 시 공통 권한이 클래스 크기보다 큰 배열에 쓰여지면서 힙 영역의 경계를 벗어나는 쓰기(Out-of-bounds heap write)가 발생할 수 있습니다.
💡 쉬운 설명
보안 규칙을 설정할 때 실제 필요한 공간보다 작은 공간을 할당하도록 설정하면, 데이터가 정해진 범위를 넘어서 저장되는 문제가 있습니다. 이로 인해 시스템의 메모리가 오염되어 보안이 무력화되거나 시스템 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
selinux: reject a class permission count below its inherited common
security_get_permissions() maps an inherited common's permissions into
an array sized by the class's own permissions.nprim, but class_read()
takes that nprim verbatim from the policy image and never checks that it
covers the common. A class that inherits a common of N permissions while
declaring a smaller nprim is accepted, and on load the common's
permissions are written past the class-sized array -- an out-of-bounds
heap write.
Reject a class whose permission count is below its inherited common's.
Well-formed policies, where the class count already includes the
inherited permissions, are unaffected.
📍 영향받는 시스템
SELinux를 사용하는 Linux 커널 (패치 적용 전 버전)
⚔️ 공격 벡터
조작된 SELinux 보안 정책 파일을 시스템에 로드하여 메모리 오염 유도
🛡️ 대응 방법
SELinux 권한 개수 검증 로직이 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 보안 패치 버전인지 확인