🇰🇷 한글 설명
Linux 커널의 SELinux 구성 요소에서 권한 값이 해당 클래스의 허용 범위를 초과할 경우 발생하는 취약점입니다. perm_read() 함수가 권한 값을 검증할 때 클래스별 권한 개수(nprim)를 확인하지 않아, 잘못된 정책 이미지 사용 시 힙 영역에 범위를 벗어난 쓰기(Out-of-bounds heap write)가 발생할 수 있습니다.
💡 쉬운 설명
SELinux 보안 설정 파일에 잘못된 권한 값이 포함되어 있을 경우, 시스템 메모리의 잘못된 위치에 데이터를 써서 오류를 일으키거나 보안을 무력화할 수 있는 문제입니다. 정상적인 설정에서는 문제가 없으나, 조작된 보안 정책이 적용될 때 위험합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
selinux: reject a permission value exceeding the class permission count
perm_read() bounds a permission value by SEL_VEC_MAX but never by the
nprim of the owning class or common, which is taken verbatim from the
policy image. security_get_permissions() then writes perms[value - 1]
into an nprim-sized kcalloc() array, so a class declaring fewer
permissions than its largest permission value drives an out-of-bounds
heap write. The top-level symbol tables are validated this way; the
nested per-class permission table is not.
Reject a permission whose value exceeds nprim, which is already set when
perm_read() runs. Well-formed policies are unaffected.
[PM: tweak comment for line length]
📍 영향받는 시스템
Linux Kernel (SELinux를 사용하는 시스템)
⚔️ 공격 벡터
조작된 SELinux 정책 이미지를 시스템에 로드하여 힙 메모리 오버플로우 유도
🛡️ 대응 방법
SELinux 권한 값의 범위를 검증하는 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인