🇰🇷 한글 설명
리눅스 커널의 sched_setaffinity 함수에서 cpuset 업데이트와 태스크 선호도(affinity) 설정 간의 경합 조건으로 인해 불필요한 경고(WARN)가 발생하는 취약점입니다. cpuset 마스크와 요청된 affinity 사이에 겹치는 부분이 없더라도 경고가 트리거되는 논리적 오류가 수정되었습니다.
💡 쉬운 설명
컴퓨터의 작업 처리 순서를 정할 때, 설정이 바뀌는 찰나의 순간에 시스템이 잘못된 경고 메시지를 띄우는 문제입니다. 실제 보안 위협보다는 시스템 로그에 불필요한 경고가 남는 현상에 가깝습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
sched: fix warning in sched_setaffinity
Commit 8f9ea86fdf99b added some logic to sched_setaffinity that included
a WARN when a per-task affinity assignment races with a cpuset update.
Specifically, we can have a race where a cpuset update results in the
task affinity no longer being a subset of the cpuset. That's fine; we
have a fallback to instead use the cpuset mask. However, we have a WARN
set up that will trigger if the cpuset mask has no overlap at all with
the requested task affinity. This shouldn't be a warning condition; its
trivial to create this condition.
Reproduced the warning by the following setup:
- $PID inside a cpuset cgroup
- another thread repeatedly switching the cpuset cpus from 1-2 to just 1
- another thread repeatedly setting the $PID affinity (via taskset) to 2
📍 영향받는 시스템
Linux Kernel (sched_setaffinity 관련 로직이 포함된 버전)
⚔️ 공격 벡터
로컬 사용자가 cpuset 변경과 taskset 명령을 동시에 반복 실행하여 경고를 유도하는 방식
🛡️ 대응 방법
커널 패치(Commit 8f9ea86fdf99b 포함 버전)를 적용하여 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인