🇰🇷 한글 설명
Linux 커널의 KVM s390 구현에서 kvm_s390_get_cmma_bits() 함수가 vmalloc()을 사용하여 메모리를 할당할 때 초기화를 수행하지 않아 발생하는 취약점입니다. 이로 인해 특정 조건에서 dirty bit가 설정되지 않은 페이지 사이의 간격에 남아있는 이전 커널 메모리 데이터가 사용자 공간으로 유출될 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제(커널)가 메모리를 빌려줄 때, 이전에 사용하던 흔적을 깨끗이 지우지 않고 그대로 넘겨주는 문제입니다. 이로 인해 해커가 시스템 내부의 민감한 정보를 훔쳐볼 수 있는 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
KVM: s390: Initialize KVM_S390_GET_CMMA_BITS memory
kvm_s390_get_cmma_bits() allocates its output buffer with vmalloc(),
which does not zero the returned pages:
values = vmalloc(args->count);
In the non-peek (migration) path, dat_get_cmma() reports a byte count
spanning from the first to the last dirty page, but __dat_get_cmma_pte()
writes values[gfn - start] only for pages whose CMMA dirty bit is set.
The walk uses DAT_WALK_IGN_HOLES, so clean and unmapped pages that lie
between two dirty pages within the reported span are visited but never
store their byte. Those gaps (up to KVM_S390_MAX_BIT_DISTANCE pages
each) stay uninitialized yet fall inside [0, count) and are copied out
by copy_to_user(), disclosing stale kernel memory to user space.
Before the switch to the new gmap implementation the buffer was fully
populated for every gfn in the span, so no uninitialized bytes were
exposed; the dirty-only walk introduced the leak.
Use vzalloc() so the gaps read back as zero.
📍 영향받는 시스템
Linux kernel (KVM s390 architecture components)
⚔️ 공격 벡터
로컬 사용자 권한을 이용한 KVM_S390_GET_CMMA_BITS 호출을 통한 커널 메모리 정보 유출
🛡️ 대응 방법
vmalloc() 대신 메모리를 0으로 초기화하는 vzalloc()을 사용하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인합니다.