🇰🇷 한글 설명
Linux 커널의 perf/x86/intel 구성 요소에서 ACR 마스크 검증 및 설정 오류가 발견되었습니다. 사용자 공간의 ACR 마스크 검증이 불완전하고, 잘못된 마스크 입력 시 후속 그룹 설정이 건너뛰어지며, 하드웨어 마스크 초기화가 누락되는 문제가 포함되어 있습니다.
💡 쉬운 설명
컴퓨터의 성능을 측정하는 기능에서 설정값이 잘못 입력되었을 때 이를 제대로 걸러내지 못하거나 설정이 꼬이는 문제가 있습니다. 이로 인해 성능 측정 도구가 의도한 대로 정확하게 작동하지 않을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
perf/x86/intel: Improve validation and configuration of ACR masks
Currently there are several issues on the user space ACR mask validation
and configuration.
- The validation for user space ACR mask (attr.config2) is incomplete,
e.g., the ACR mask could include the index which belongs to another
ACR events group, but it's not validated.
- An early return on an invalid ACR mask caused all subsequent ACR groups
to be skipped.
- The stale hardware ACR mask (hw.config1) is not cleared before setting
new hardware ACR mask.
The following changes address all of the above issues.
- Figure out the event index group of an ACR group. Any bits in the
user-space mask not present in the index group are now dropped.
- Instead of an early return on invalid bits, drop only the invalid
portions and continue iterating through all ACR events to ensure full
configuration.
- Explicitly clear the stale hardware ACR mask for each event prior to
writing the new configuration.
Besides, a non-leader event member of ACR group could be disabled in
theory. This could cause bit-shifting errors in the acr_mask of remaining
group members. But since ACR sampling requires all events to be active,
this should not be a big concern in real use case. Add a "FIXME" comment
to notice this risk.
📍 영향받는 시스템
Linux Kernel (perf/x86/intel 관련 모듈 사용 시스템)
⚔️ 공격 벡터
사용자 공간에서 조작된 ACR 마스크 설정을 통해 성능 모니터링 구성의 무결성을 해치거나 설정 오류를 유도함
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ACR 마스크 검증 및 초기화 로직을 수정해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.