🇰🇷 한글 설명
Linux 커널의 CXL(Compute Express Link) 영역 삭제 과정에서 발생하는 레이스 컨디션 취약점이 해결되었습니다. 기존에는 sysfs를 통한 영역 삭제 시 중복 삭제 시도가 가능하거나 커널의 루트 디바이스 해제 과정과 충돌할 수 있었으나, xarray와 regions_lock을 도입하여 이를 방지했습니다.
💡 쉬운 설명
컴퓨터의 메모리 관리 기능 중 하나인 CXL 영역을 지울 때, 여러 명령이 동시에 들어오면 시스템이 혼란을 겪을 수 있는 문제가 있었습니다. 이번 수정으로 여러 명령이 동시에 들어와도 순서대로 안전하게 처리되도록 개선되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
cxl/region: Resolve region deletion races
Sungwoo noticed that the sysfs trigger to delete a region may try to delete
a region multiple times. It also has no exclusion relative to the kernel
releasing the region via CXL root device teardown.
Instead of installing new cxl root devres actions per region, use the
existing root decoder unregistration event to remove all remaining regions.
An xarray of regions replaces a devres list of regions.
This handles 3 separate issues with the old approach:
1/ sysfs users racing to delete the same region: no longer possible now
that the regions_lock is held over the lookup and deletion.
2/ multiple actions triggering deletion of the same region: solved by
erasing regions while holding @regions_lock, and only proceeding on
successful erasure.
3/ userspace racing devres_release_all() to trigger the devres not found
warning: solved by sysfs unregistration not requiring a release action
📍 영향받는 시스템
CXL 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
로컬 사용자가 sysfs를 통해 의도적으로 중복된 영역 삭제 명령을 동시에 실행하여 레이스 컨디션 유도
🛡️ 대응 방법
CXL 관련 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인