🇰🇷 한글 설명
Linux 커널의 hisi: hns3 드라이버에서 perf 도구를 통해 이벤트 그룹을 생성할 때 배열 인덱스 범위를 확인하지 않는 취약점이 발견되었습니다. 이벤트 그룹 내 이벤트 수가 최대 허용치를 초과할 경우 event_group 배열에 메모리 쓰기 오버플로우가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 성능을 측정하는 도구를 사용할 때, 정해진 저장 공간보다 더 많은 데이터를 넣으려고 하면 메모리 영역을 침범하는 오류가 발생합니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drivers/perf: hisi: hns3: Fix out-of-bound access when valid event group
The perf tool allows users to create event groups through following
cmd [1], but the driver does not check whether the array index is out
of bounds when writing data to the event_group array. If the number of
events in an event_group is greater than HNS3_PMU_MAX_HW_EVENTS, the
memory write overflow of event_group array occurs.
Add array index check to fix the possible array out of bounds violation,
and return directly when write new events are written to array bounds.
There are 9 different events in an event_group.
[1] perf stat -e '{pmu/event1/, ... ,pmu/event9/}
📍 영향받는 시스템
hisi: hns3 드라이버를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
perf 도구를 사용하여 허용된 이벤트 개수(HNS3_PMU_MAX_HW_EVENTS)를 초과하는 이벤트 그룹을 생성함으로써 메모리 오버플로우 유도
🛡️ 대응 방법
배열 인덱스 검사 로직이 포함된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인