🇰🇷 한글 설명
리눅스 커널의 sched/fair 구성 요소에서 child_cfs_rq_on_list 함수가 잘못된 포인터를 cfs_rq 구조체로 변환하여 메모리 오염을 유발할 수 있는 취약점입니다. 특정 상황에서 leaf_cfs_rq_list 포인터가 잘못 처리되어 메모리 오류가 발생하거나 쓰레기 데이터에 접근할 위험이 있습니다.
💡 쉬운 설명
컴퓨터의 작업 관리 역할을 하는 리눅스 커널이 데이터를 처리하는 과정에서 주소를 잘못 읽어 메모리가 엉키는 문제입니다. 이로 인해 시스템이 예상치 못한 동작을 하거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
sched/fair: Fix potential memory corruption in child_cfs_rq_on_list
child_cfs_rq_on_list attempts to convert a 'prev' pointer to a cfs_rq.
This 'prev' pointer can originate from struct rq's leaf_cfs_rq_list,
making the conversion invalid and potentially leading to memory
corruption. Depending on the relative positions of leaf_cfs_rq_list and
the task group (tg) pointer within the struct, this can cause a memory
fault or access garbage data.
The issue arises in list_add_leaf_cfs_rq, where both
cfs_rq->leaf_cfs_rq_list and rq->leaf_cfs_rq_list are added to the same
leaf list. Also, rq->tmp_alone_branch can be set to rq->leaf_cfs_rq_list.
This adds a check `if (prev == &rq->leaf_cfs_rq_list)` after the main
conditional in child_cfs_rq_on_list. This ensures that the container_of
operation will convert a correct cfs_rq struct.
This check is sufficient because only cfs_rqs on the same CPU are added
to the list, so verifying the 'prev' pointer against the current rq's list
head is enough.
Fixes a potential memory corruption issue that due to current struct
layout might not be manifesting as a crash but could lead to unpredictable
behavior when the layout changes.
📍 영향받는 시스템
Linux Kernel (sched/fair 관련 구성 요소가 포함된 버전)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 특정 스케줄링 상황을 유도하여 메모리 오염 유발
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인