🇰🇷 한글 설명
Linux 커널의 s390/vfio-ap 구성에서 마지막 AP 어댑터나 도메인이 제거될 때 핫-언플러그(hot-unplug) 프로세스가 건너뛰어지는 취약점입니다. bitmap_andnot() 함수의 반환 값 오류로 인해 게스트의 APCB가 업데이트되지 않아, 제거된 하드웨어에 대한 권한이 게스트에 그대로 남게 됩니다.
💡 쉬운 설명
컴퓨터에서 사용하던 장치를 제거했는데, 시스템이 이를 제대로 인식하지 못해 장치가 여전히 연결되어 있다고 착각하는 문제입니다. 이로 인해 보안상 위험한 상태로 장치 접근 권한이 남아있을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
s390/vfio-ap: Fix hot-unplug skipped when last AP adapter or domain removed
The vfio_ap_mdev_hot_unplug_cfg() function uses the return value of
bitmap_andnot() to determine whether the guest APCB needs to be updated.
However, bitmap_andnot() returns false when the resulting destination
bitmap is empty. This means that if the only adapter, domain or control
domain assigned to an mdev is removed from the host's AP configuration,
the bit is correctly cleared from the shadow APCB, but bitmap_andnot()
returns false because the result is an empty bitmap. Consequently,
do_hotplug remains 0 and vfio_ap_mdev_update_guest_apcb() is never called,
leaving the KVM guest with stale hardware access to the unplugged AP
devices.
Fix this by replacing the bitmap_andnot() return value check with
bitmap_intersects() to determine whether the shadow APCB actually
overlaps with the removal mask. If there is an intersection, call
bitmap_andnot() solely for its side effect of clearing the bits, then
unconditionally set do_hotplug to trigger the guest APCB update.
📍 영향받는 시스템
Linux kernel (s390 architecture, vfio-ap component)
⚔️ 공격 벡터
로컬 공격자가 가상 머신(KVM) 환경에서 특정 하드웨어 자원을 제거하여 게스트가 유효하지 않은 하드웨어 자원에 계속 접근하도록 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 bitmap_andnot() 대신 bitmap_intersects()를 사용하도록 수정
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인