🇰🇷 한글 설명
Linux 커널의 s390/vfio-ap 구성 중 apm_filtered 비트맵이 초기화되지 않은 상태로 사용되는 취약점이 발견되었습니다. 특정 조건에서 비트맵이 0으로 초기화되지 않고 스택의 쓰레기 값(garbage)을 포함한 채 함수로 전달되어, 의도하지 않은 게스트 하드웨어 큐 리셋이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 메모리의 임의의 데이터가 잘못된 명령으로 해석되어, 사용자가 원하지 않는 하드웨어 초기화 작업이 실행될 수 있는 문제입니다. 이는 시스템의 안정성을 해치거나 예기치 않은 동작을 유발할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
s390/vfio-ap: fix potential use of uninitialized apm_filtered bitmap
The DECLARE_BITMAP(apm_filtered, AP_DEVICES) macro allocates the bitmap
on the stack without zero-initializing it.
In vfio_ap_mdev_hot_plug_cfg(), the vfio_ap_mdev_filter_matrix() function
is only called to initialize and populate apm_filtered if either
filter_adapters or filter_domains is true. If the hot plug configuration
change only adds control domains (meaning filter_cdoms is true, but
filter_adapters and filter_domains are both false),
vfio_ap_mdev_filter_matrix() is bypassed.
Consequently, apm_filtered is passed to reset_queues_for_apids() with
uninitialized stack garbage. This can cause reset_queues_for_apids() to
interpret arbitrary stack garbage bits as valid APIDs to reset, potentially
performing unintended guest hardware queue resets.
Fix this by zero-initializing the apm_filtered bitmap at the beginning of
vfio_ap_mdev_hot_plug_cfg() using bitmap_zero().
📍 영향받는 시스템
Linux kernel (s390 architecture, vfio-ap module)
⚔️ 공격 벡터
특정 조건(filter_cdoms만 true인 경우)에서 vfio-ap의 핫 플러그 구성을 변경하여 스택의 쓰레기 값을 유도함
🛡️ 대응 방법
커널 패치를 통해 vfio_ap_mdev_hot_plug_cfg() 함수 시작 시 bitmap_zero()를 사용하여 apm_filtered 비트맵을 0으로 초기화해야 함
🔧 검증 코드
현재 실행 중인 커널 버전과 vfio 모듈 로드 여부를 확인하여 해당 취약점이 수정된 최신 커널인지 대조함
uname -a && grep -i 'vfio' /proc/modules 2>/dev/null