🇰🇷 한글 설명
리눅스 커널 IMA(무결성 측정 아키텍처) 버퍼 처리에서 발생하는 페이지 폴트 취약점입니다. 메모리 제한 옵션(mem=<size>)으로 kexec 부팅될 때 이전 커널의 IMA 측정 버퍼가 새 커널의 주소 지정 가능한 RAM 범위를 벗어나 초기 복원 중 크래시를 유발합니다. ima_validate_range() 함수 추가로 물리 메모리 범위 검증을 통해 해결됩니다.
💡 쉬운 설명
Linux 시스템이 메모리 제한 옵션으로 재부팅할 때 이전 부팅의 측정 기록에 접근하려다 메모리 접근 오류로 충돌하는 문제입니다. 측정 버퍼가 실제로 접근 가능한 메모리 범위에 있는지 먼저 확인하는 검증 단계를 추가하면 해결됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ima: verify the previous kernel's IMA buffer lies in addressable RAM
Patch series "Address page fault in ima_restore_measurement_list()", v3.
When the second-stage kernel is booted via kexec with a limiting command
line such as "mem=<size>" we observe a pafe fault that happens.
BUG: unable to handle page fault for address: ffff97793ff47000
RIP: ima_restore_measurement_list+0xdc/0x45a
#PF: error_code(0x0000) not-present page
This happens on x86_64 only, as this is already fixed in aarch64 in
commit: cbf9c4b9617b ("of: check previous kernel's ima-kexec-buffer
against memory bounds")
This patch (of 3):
When the second-stage kernel is booted with a limiting command line (e.g.
"mem=<size>"), the IMA measurement buffer handed over from the previous
kernel may fall outside the addressable RAM of the new kernel. Accessing
such a buffer can fault during early restore.
Introduce a small generic helper, ima_validate_range(), which verifies
that a physical [start, end] range for the previous-kernel IMA buffer lies
within addressable memory:
- On x86, use pfn_range_is_mapped().
- On OF based architectures, use page_is_ram().
📍 영향받는 시스템
x86_64 Linux kernel with IMA enabled, kexec used for system reboot; aarch64 already patched in commit cbf9c4b9617b
⚔️ 공격 벡터
Local: requires ability to initiate system reboot with kexec and memory-limiting kernel parameters; not remotely exploitable
🛡️ 대응 방법
Update kernel to patched version containing ima_validate_range() validation; or apply upstream kernel patches from ima_restore_measurement_list() fix series v3
🔧 검증 코드
Config shows CONFIG_IMA=y (IMA enabled) and ima_validate_range symbol present in kernel indicates patch applied; absence indicates vulnerable kernel version
grep -i CONFIG_IMA /boot/config-$(uname -r) 2>/dev/null && strings /boot/vmlinuz-$(uname -r) | grep -q ima_validate_range && echo 'Patched' || echo 'Vulnerable'