🇰🇷 한글 설명
Linux 커널 arm64 아키텍처에서 가상 주소(VA) 범위 검사 로직에 오류가 발견되었습니다. 기존의 잘못된 조건문이 특정 메모리 영역(KASAN 또는 모듈 영역)에 대한 매핑 생성을 방해할 수 있었으나, 이를 TTBR1 주소 공간의 시작점인 PAGE_OFFSET 기준으로 수정하여 정상화했습니다.
💡 쉬운 설명
컴퓨터의 메모리 주소를 확인하는 규칙이 잘못 설정되어 있어, 특정 중요한 메모리 영역을 사용할 때 오류가 발생할 수 있었습니다. 이 규칙을 올바른 기준으로 수정하여 메모리 관리의 정확성을 높였습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
arm64: mm: fix VA-range sanity check
Both create_mapping_noalloc() and update_mapping_prot() sanity-check
their 'virt' parameter, but the check itself doesn't make much sense.
The condition used today appears to be a historical accident.
The sanity-check condition:
if ((virt >= PAGE_END) && (virt < VMALLOC_START)) {
[ ... warning here ... ]
return;
}
... can only be true for the KASAN shadow region or the module region,
and there's no reason to exclude these specifically for creating and
updateing mappings.
When arm64 support was first upstreamed in commit:
c1cc1552616d0f35 ("arm64: MMU initialisation")
... the condition was:
if (virt < VMALLOC_START) {
[ ... warning here ... ]
return;
}
At the time, VMALLOC_START was the lowest kernel address, and this was
checking whether 'virt' would be translated via TTBR1.
Subsequently in commit:
14c127c957c1c607 ("arm64: mm: Flip kernel VA space")
... the condition was changed to:
if ((virt >= VA_START) && (virt < VMALLOC_START)) {
[ ... warning here ... ]
return;
}
This appear to have been a thinko. The commit moved the linear map to
the bottom of the kernel address space, with VMALLOC_START being at the
halfway point. The old condition would warn for changes to the linear
map below this, and at the time VA_START was the end of the linear map.
Subsequently we cleaned up the naming of VA_START in commit:
77ad4ce69321abbe ("arm64: memory: rename VA_START to PAGE_END")
... keeping the erroneous condition as:
if ((virt >= PAGE_END) && (virt < VMALLOC_START)) {
[ ... warning here ... ]
return;
}
Correct the condition to check against the start of the TTBR1 address
space, which is currently PAGE_OFFSET. This simplifies the logic, and
more clearly matches the "outside kernel range" message in the warning.
📍 영향받는 시스템
Linux kernel (arm64 architecture)
⚔️ 공격 벡터
직접적인 공격 벡터는 없으며, 잘못된 주소 검사로 인한 시스템 기능 제한 또는 경고 발생 가능성
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.