🇰🇷 한글 설명
Linux 커널의 perf/core 구성 요소에서 remove_on_exec 호출 시 이벤트 그룹의 연결을 제대로 해제하지 않아 발생하는 취약점입니다. 이로 인해 그룹 리더가 제거된 후에도 형제 이벤트들이 유효하지 않은 상태로 남아 PMU 컨텍스트의 활성 리스트를 손상시킬 수 있습니다.
💡 쉬운 설명
프로그램이 실행될 때 기존의 성능 측정 도구들을 정리하는 과정에서 데이터 연결이 꼬이는 문제입니다. 이 오류가 발생하면 시스템의 핵심 관리 목록이 망가져 시스템 불안정이나 오류를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
perf/core: Detach event groups during remove_on_exec
perf_event_remove_on_exec() removes events by calling
perf_event_exit_event(). For top-level events, this removes the event from
the context with DETACH_EXIT only.
This can leave inconsistent group state when a removed event is a group
leader and the group contains siblings without remove_on_exec. If the group
was active, the surviving siblings can remain active and attached to the
removed leader's sibling list, but are no longer represented by a valid
group leader on the PMU context active lists.
A later close of the removed leader uses DETACH_GROUP and can promote the
still-active siblings from this stale group state. The next schedule-in can
then add an already-linked active_list entry again, corrupting the PMU
context active list.
With DEBUG_LIST enabled, this is caught as a list_add double-add in
merge_sched_in().
Fix this by detaching group relationships when remove_on_exec removes an
event. This preserves the existing task-exit and revoke behavior, while
ensuring surviving siblings are ungrouped before the removed event leaves
the context.
📍 영향받는 시스템
Linux Kernel (perf/core 관련 모듈 사용 시스템)
⚔️ 공격 벡터
특정 조건에서 perf 이벤트의 그룹 리더를 제거하여 PMU 컨텍스트의 리스트를 중복 추가(double-add)하게 만드는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 remove_on_exec 시 그룹 관계를 강제로 해제하도록 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.