🇰🇷 한글 설명
Linux 커널의 KVM s390 모듈에서 SIGP Stop and Store Status 처리 시 스핀락을 보유한 상태로 사용자 공간 쓰기를 수행하던 문제를 수정했습니다. 해당 작업을 락 외부에서 수행하도록 변경되었습니다.
💡 쉬운 설명
가상 머신 CPU를 정지시키면서 상태를 저장하는 과정에서 잠금을 잡은 채로 메모리에 쓰기를 시도하던 결함입니다. 이로 인해 커널이 멈추거나 불안정해질 수 있어 실행 순서를 수정했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
KVM: s390: Fix IRQ injection with SIGP Stop and Store Status
When __inject_sigp_stop() is called for a Stop and Store Status
operation, if the vCPU is running, the interrupt is marked as pending
and the status is stored by the thread performing the KVM_RUN IOCTL.
If the vCPU is already stopped, the status is stored immediately.
Storing the status means writing into userspace, which might fault, and
__inject_sigp_stop() is called from do_inject_vcpu() which in turn is
always called holding a spinlock, which is obviously an issue.
Fix this by returning -EWOULDBLOCK from __inject_sigp_stop(), and
adding a bool flag to indicate whether a store status is needed. The
callers of do_inject_vcpu() are modified to pass the pointer to the
bool flag; whenever a Store Status operation is needed, the callers can
now perform it outside the spinlock.
Opportunistically refactor kvm_s390_set_irq_state() to use
scoped_guard() and __free().
[ Added Fixes tag while picking -- Claudio ]
📍 영향받는 시스템
IBM Z(s390) 아키텍처에서 KVM을 사용하는 Linux 커널 (수정 이전 버전)
⚔️ 공격 벡터
가상화 게스트 권한을 가진 공격자가 SIGP Stop and Store Status 명령을 유발해 커널 잠금 상태에서 페이지 폴트를 일으키는 방식으로 악용 가능성이 있음
🛡️ 대응 방법
패치된 Linux 커널 버전으로 업데이트하고 재부팅
🔧 검증 코드
출력된 커널 버전을 배포판 벤더의 보안 공지에서 해당 CVE 수정 버전과 비교하고, 같거나 높으면 패치가 적용된 것입니다.