🔍 CVE-2024-35980

8.4
CVSS Score
HIGH
2024-05-20
2026-08-04 11:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 arm64 아키텍처에서 KVM 라이브 마이그레이션 중 TLB(Translation Lookaside Buffer)를 플러시할 때 발생하는 취약점입니다. TLBI RANGE 명령의 피연산자가 잘못 계산되어 TLB가 완전히 비워지지 않음으로써, 마이그레이션 후 대상 VM에서 시스템 충돌이 발생할 수 있습니다.

💡 쉬운 설명

가상 머신을 다른 서버로 옮길 때 메모리 정보를 정리하는 과정에서 계산 오류가 발생합니다. 이 오류로 인해 컴퓨터가 제대로 된 정보를 읽지 못하고 갑자기 멈추거나 꺼질 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: arm64: tlb: Fix TLBI RANGE operand KVM/arm64 relies on TLBI RANGE feature to flush TLBs when the dirty pages are collected by VMM and the page table entries become write protected during live migration. Unfortunately, the operand passed to the TLBI RANGE instruction isn't correctly sorted out due to the commit 117940aa6e5f ("KVM: arm64: Define kvm_tlb_flush_vmid_range()"). It leads to crash on the destination VM after live migration because TLBs aren't flushed completely and some of the dirty pages are missed. For example, I have a VM where 8GB memory is assigned, starting from 0x40000000 (1GB). Note that the host has 4KB as the base page size. In the middile of migration, kvm_tlb_flush_vmid_range() is executed to flush TLBs. It passes MAX_TLBI_RANGE_PAGES as the argument to __kvm_tlb_flush_vmid_range() and __flush_s2_tlb_range_op(). SCALE#3 and NUM#31, corresponding to MAX_TLBI_RANGE_PAGES, isn't supported by __TLBI_RANGE_NUM(). In this specific case, -1 has been returned from __TLBI_RANGE_NUM() for SCALE#3/2/1/0 and rejected by the loop in the __flush_tlb_range_op() until the variable @scale underflows and becomes -9, 0xffff708000040000 is set as the operand. The operand is wrong since it's sorted out by __TLBI_VADDR_RANGE() according to invalid @scale and @num. Fix it by extending __TLBI_RANGE_NUM() to support the combination of SCALE#3 and NUM#31. With the changes, [-1 31] instead of [-1 30] can be returned from the macro, meaning the TLBs for 0x200000 pages in the above example can be flushed in one shoot with SCALE#3 and NUM#31. The macro TLBI_RANGE_MASK is dropped since no one uses it any more. The comments are also adjusted accordingly.

📍 영향받는 시스템

arm64 아키텍처를 사용하는 Linux 커널 기반 시스템 (KVM 사용 환경)

⚔️ 공격 벡터

직접적인 외부 공격보다는 라이브 마이그레이션 과정 중 발생하는 논리적 오류로 인한 서비스 거부(DoS) 가능성

🛡️ 대응 방법

TLBI RANGE 피연산자 계산 오류를 수정한 최신 Linux 커널로 업데이트

🔧 검증 코드

현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel