🇰🇷 한글 설명
Linux 커널의 MTRR(메모리 타입 범위 레지스터) 고정 MTRR 저장 함수에서 CPU capability를 확인하지 않은 취약점입니다. Fixed MTRR을 지원하지 않는 CPU에서 MSR 접근 시 #GP fault와 WARN_ON()이 발생합니다. Capability bit 확인을 추가하여 수정되었습니다.
💡 쉬운 설명
오래된 메모리 제어 기능(Fixed MTRR)을 지원하지 않는 컴퓨터에서 이 기능에 접근하려다 시스템이 경고를 표시하는 문제입니다. 컴퓨터가 이 기능을 가지고 있는지 먼저 확인하도록 커널 코드를 수정했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
x86/mtrr: Check if fixed MTRRs exist before saving them
MTRRs have an obsolete fixed variant for fine grained caching control
of the 640K-1MB region that uses separate MSRs. This fixed variant has
a separate capability bit in the MTRR capability MSR.
So far all x86 CPUs which support MTRR have this separate bit set, so it
went unnoticed that mtrr_save_state() does not check the capability bit
before accessing the fixed MTRR MSRs.
Though on a CPU that does not support the fixed MTRR capability this
results in a #GP. The #GP itself is harmless because the RDMSR fault is
handled gracefully, but results in a WARN_ON().
Add the missing capability check to prevent this.
📍 영향받는 시스템
Linux kernel - 특히 Fixed MTRR을 지원하지 않는 x86 CPU 시스템
⚔️ 공격 벡터
시스템 시작 시 MTRR 상태 저장 중 호환성 문제로 인한 kernel panic 또는 경고 발생
🛡️ 대응 방법
최신 Linux kernel 패치 적용 (MTRR capability bit 확인 로직 추가)
🔧 검증 코드
첫 줄은 CPU의 MTRR 지원 여부 확인, 두 번째 줄은 최근 MTRR 관련 경고나 에러 로그 확인 - 경고가 없으면 패치가 적용되었거나 해당 CPU에서 발생하지 않는 상황
grep -i mtrr /proc/cpuinfo | head -1 && dmesg | grep -E 'WARN.*MTRR|mtrr.*fault' | tail -1