🇰🇷 한글 설명
리눅스 커널의 page_reporting 프로세스가 시스템 절전 모드(S3/S4) 전환 시 적절히 중단되지 않아 발생하는 Use-After-Free(UAF) 취약점입니다. 장치 드라이버가 가상 큐를 삭제한 후에도 페이지 보고 작업이 실행되면서 잘못된 메모리 주소에 접근하여 시스템 충돌(GPF)을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터가 잠자기 모드로 들어갈 때, 이미 삭제된 장치 정보를 사용하려고 시도하여 시스템이 멈추거나 오류가 발생하는 문제입니다. 이를 해결하기 위해 잠자기 모드 중에는 해당 작업이 멈추도록 설정이 변경되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/page_reporting: use system_freezable_wq to fix UAF during suspend
During PM freeze (e.g. S3 suspend or S4 hibernation), device drivers like
virtio_balloon reset their underlying virtio devices and delete their
virtqueues via vdev->config->del_vqs().
However, page reporting work (page_reporting_process) was scheduled on the
global system_wq. Because system_wq lacks the WQ_FREEZABLE flag, the PM
freezer skips it, leaving page_reporting_process active during suspend.
If pages are freed into the buddy allocator while suspending (for example,
when core MM invokes the balloon shrinker during S4 hibernation image
saving), page reporting triggers virtballoon_free_page_report() on deleted
virtqueues, resulting in a Use-After-Free / General Protection Fault:
[ 196.795226] general protection fault, probably for non-canonical address 0xaa1436fe70dae6df: 0000 [#1] SMP NOPTI
[ 196.825967] Workqueue: events page_reporting_process
[ 196.831038] RIP: 0010:virtqueue_add_split+0x233/0x4c0 [virtio_ring]
[ 196.927073] virtballoon_free_page_report+0x3a/0xe0 [virtio_balloon]
[ 196.946943] page_reporting_process+0x370/0x4f0
Fix this by switching page reporting work to system_freezable_wq. This
ensures that the PM freezer pauses page_reporting_process before device
drivers destroy their reporting virtqueues. Because the reporting worker
is frozen, memory reclamation/freeing (e.g. via shrinker execution) can
safely return pages to MM during freeze without triggering unfrozen
reporting work on deleted virtqueues.
This aligns with the driver's existing design. The comment in
virtballoon_freeze() states:
/*
* The workqueue is already frozen by the PM core before this
* function is called.
*/
Testing:
I have verified these fixes using Google’s virtualization infrastructure
by running continuous suspend/resume iterations (40+ cycles) while
churning memory using stress-ng (`stress-ng --vm 4 --vm-bytes 60%
--timeout 1`) to constantly create free pages for the buddy allocator. We
also set the `page_reporting_order` parameter to 0 to make the page
reporting worker highly sensitive, forcing it to pick up any 4K free
pages. This confirmed that the UAF crashes are no longer reproducible.
📍 영향받는 시스템
Linux kernel (mm/page_reporting 관련 모듈 사용 시스템)
⚔️ 공격 벡터
로컬 공격자가 메모리 회수(Shrinker)를 유도하여 절전 모드 진입 시 시스템 충돌 유발
🛡️ 대응 방법
리눅스 커널을 최신 패치 버전으로 업데이트하여 page_reporting_process가 system_freezable_wq를 사용하도록 수정
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux