🇰🇷 한글 설명
Linux 커널의 DAMON 모듈에서 damon_set_regions() 함수가 입력된 메모리 범위의 중복 여부를 검증하지 않는 취약점이 발견되었습니다. 이로 인해 중복된 범위나 음수 크기의 영역이 생성될 수 있으며, 이는 커널 경고(WARN_ONCE)나 0으로 나누기(division by zero) 오류를 유발할 수 있습니다.
💡 쉬운 설명
메모리를 감시하는 기능에서 서로 겹치는 영역을 설정할 수 있게 되어 시스템이 혼란에 빠질 수 있습니다. 이로 인해 시스템이 비정상적으로 작동하거나 갑자기 멈추는 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/damon/core: disallow overlapping input ranges for damon_set_regions()
damon_set_regions() assumes the input ranges are sorted by the address and
don't overlap each other. Hence the assumption was initially to be
explicitly validated. But commit 97d482f4592f ("mm/damon/sysfs: reuse
damon_set_regions() for regions setting") has mistakenly removed the
validation.
This can make DAMON behave in unexpected ways. At the best, the
monitoring results snapshot will just look weird since there will be
overlapping regions. DAMOS will also work weirdly, applying the same
action multiple times for overlapping regions, and make DAMOS quota weird.
More seriously, depending on the setup and regions updates sequence,
negative size regions can be made. It will trigger WARN_ONCE() if the
kernel is built with CONFIG_DAMON_DEBUG_SANITY=y. Depending on the
monitoring results, the negative size region can further trigger division
by zero in damon_merge_two_regions().
Note that some of the consequences including the WARN_ONCE() and the
divide by zero depend on commits that were introduced after the root cause
commit 97d482f4592f ("mm/damon/sysfs: reuse damon_set_regions() for
regions setting").
Fix the problems by checking the assumption and returning an error if
the input ranges don't meet the assumption.
The issue was discovered [1] by Sashiko.
📍 영향받는 시스템
DAMON 기능이 활성화된 Linux 커널 (특정 커밋 97d482f4592f 이후 버전)
⚔️ 공격 벡터
로컬 사용자가 DAMON 인터페이스를 통해 중복되거나 잘못된 메모리 범위를 설정하여 커널 오류 유도
🛡️ 대응 방법
DAMON 관련 커널 패치를 적용하거나, 입력 범위의 중복을 검증하는 최신 커널로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인하십시오.
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux