🇰🇷 한글 설명
Linux 커널의 cgroup/cpuset 구성 요소에서 nr_deadline_tasks 변수가 원자적(atomic)으로 처리되지 않아 발생하는 경합 조건 취약점입니다. 서로 다른 락(lock) 환경에서 동시에 변수가 수정될 경우 데이터가 손상되어 이후 운영 체제 동작에 오류를 초래할 수 있습니다.
💡 쉬운 설명
여러 작업이 동시에 하나의 숫자를 바꾸려고 할 때, 숫자가 엉뚱하게 계산되는 오류가 발생할 수 있는 문제입니다. 이로 인해 시스템이 작업을 잘못 처리하거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
cgroup/cpuset: Make nr_deadline_tasks an atomic_t
The nr_deadline_tasks variable in the cpuset structure was introduced by
commit 6c24849f5515 ("sched/cpuset: Keep track of SCHED_DEADLINE task
in cpusets"). It is reported by sashiko [1] that nr_deadline_tasks
can currently be modified by inc_dl_tasks_cs() under rq->lock and
by cpuset_attach() under cpuset_mutex. So if both updates happen
simultaneously, the nr_deadline_tasks variable can be corrupted leading
to incorrect operations down the road.
Fix that by changing its type to atomic_t so that nr_deadline_tasks
are always atomically updated. This fix patch is a low hanging fruit.
It can handle some of the races between a concurrent sched_setscheduler()
and cpuset_can_attach()/cpuset_attach() calls, but not all of them like
the other issue raised by sashiko [2]. This will be handled hopefully
in a future follow up patch.
[1] https://sashiko.dev/#/patchset/20260626181923.133658-1-longman%40redhat.com
[2] https://sashiko.dev/#/patchset/20260630033344.352702-1-longman%40redhat.com
📍 영향받는 시스템
Linux Kernel (nr_deadline_tasks 변수가 도입된 이후 버전)
⚔️ 공격 벡터
동시에 발생하는 스케줄러 설정 변경과 cpuset 부착 작업 간의 경합을 이용한 데이터 손상
🛡️ 대응 방법
nr_deadline_tasks 변수 타입을 atomic_t로 변경하여 원자적 업데이트를 보장하는 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 확인하십시오.