🇰🇷 한글 설명
Linux 커널의 cgroup/cpuset 구성 요소에서 발생하는 취약점으로, cpuset.mems가 설정되지 않은 자식 cpuset에서 CPU 핫플러그 이벤트 발생 시 0으로 나누기(division by zero) 오류가 발생합니다. 이는 MPOL_F_RELATIVE_NODES 정책을 사용하는 VMA mempolicy가 재바인딩될 때 발생하며 시스템 크래시를 유발할 수 있습니다.
💡 쉬운 설명
특정 설정이 누락된 상태에서 CPU를 끄거나 켤 때, 컴퓨터의 핵심 운영체제(커널)가 계산 오류를 일으켜 시스템이 멈출 수 있는 문제입니다. 메모리 관리 규칙이 잘못된 값을 참조하여 수학적으로 불가능한 계산을 시도하기 때문에 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
cgroup/cpuset: rebind mm mempolicy to effective_mems, not mems_allowed
Creating a child cpuset where cpuset.mems is never set leads to a div/0
when a VMA mempolicy with MPOL_F_RELATIVE_NODES rebinds in response to a
CPU hotplug event.
Reproduction steps:
1) Create a cgroup w/ cpuset controls (do not set cpuset.mems)
2) Move the task into the child cpuset
3) Create a VMA mempolicy for that task with MPOL_F_RELATIVE_NODES
4) unplug and hotplug a cpu
echo 0 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu1/online
5) mempolicy rebind does a div/0 in mpol_relative_nodemask on the
call to __nodes_fold()
The cpuset code passes (cs->mems_allowed) which is not guaranteed to have
nodes to the rebind routine. Use cs->effective_mems instead, which is
guaranteed to have a non-empty nodemask once we reach that code path.
[ david: add a comment, slightly rephrase description ]
📍 영향받는 시스템
Linux kernel (cgroup/cpuset 관련 기능이 활성화된 시스템)
⚔️ 공격 벡터
로컬 공격자가 특정 cpuset 설정을 구성하고 CPU 핫플러그 이벤트를 유도하여 시스템을 중단시킴 (DoS)
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 cpuset 재바인딩 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.