🇰🇷 한글 설명
Linux 커널의 media chips-media wave5 드라이버에서 PM runtime 사용 카운트 언더플로우 취약점입니다. 드라이버가 제거 시 pm_runtime_put_sync()를 무조건 호출하지만, autosuspend로 인해 이미 suspended 상태이면 카운트가 -1로 내려갑니다. 모듈 언로드 시 Runtime PM 관련 경고가 발생하여 안정성을 저하시킵니다.
💡 쉬운 설명
Linux 비디오 코덱 드라이버의 전력 관리 시스템이 모듈 제거 시 잘못된 상태를 남깁니다. 직접 보안 침해는 아니지만 시스템 안정성 문제를 유발합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: chips-media: wave5: Fix PM runtime usage count underflow
Replace pm_runtime_put_sync() with pm_runtime_dont_use_autosuspend() in
the remove path to properly pair with pm_runtime_use_autosuspend() from
probe. This allows pm_runtime_disable() to handle reference count cleanup
correctly regardless of current suspend state.
The driver calls pm_runtime_put_sync() unconditionally in remove, but the
device may already be suspended due to autosuspend configured in probe.
When autosuspend has already suspended the device, the usage count is 0,
and pm_runtime_put_sync() decrements it to -1.
This causes the following warning on module unload:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 963 at kernel/kthread.c:1430
kthread_destroy_worker+0x84/0x98
...
vdec 30210000.video-codec: Runtime PM usage count underflow!
📍 영향받는 시스템
Linux kernel chips-media wave5 드라이버 (미디어 코덱 지원 SoC 보드)
⚔️ 공격 벡터
로컬 권한자가 드라이버 모듈을 언로드/제거할 때 트리거 가능
🛡️ 대응 방법
pm_runtime_put_sync()를 pm_runtime_dont_use_autosuspend()로 변경하여 PM runtime 참조 카운트 정리
🔧 검증 코드
명령어 결과가 있으면 패치가 적용된 상태입니다. 결과가 없으면 취약한 버전입니다.
grep -r 'pm_runtime_dont_use_autosuspend' /lib/modules/$(uname -r)/kernel/drivers/media/ 2>/dev/null