🇰🇷 한글 설명
Linux 커널의 accel/rocket 드라이버 내 rocket_job_run() 함수에서 오류 처리 미흡으로 인한 리소스 누수 취약점이 발견되었습니다. dma_fence 참조 및 runtime PM 참조가 해제되지 않아 메모리 누수와 NPU 절전 모드 진입 불가 문제가 발생하며, 잘못된 펜스 반환으로 인해 커널 경고가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 가속기(NPU)를 작동시키는 과정에서 오류가 발생했을 때, 사용했던 자원을 제대로 정리하지 못하는 버그입니다. 이로 인해 시스템 자원이 낭비되거나 장치가 잠자기 모드로 들어가지 못하는 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
accel/rocket: Fix error path handling in rocket_job_run()
In rocket_job_run(), after taking an extra fence reference for
job->done_fence via dma_fence_get(), the error paths have three bugs:
- The dma_fence reference held by job->done_fence is never released,
causing a reference leak.
- pm_runtime_get_sync() increments the usage counter even on failure,
but the error path does not decrement it, leaking the runtime PM
reference and preventing the NPU from suspending.
- A valid but unsignaled fence is returned to the DRM scheduler,
which triggers WARN("Fence ... released with pending signals!")
when the scheduler drops its reference.
Fix by replacing pm_runtime_get_sync() with pm_runtime_resume_and_get()
which auto-balances the usage counter on failure, releasing both fence
references on error, and returning ERR_PTR(ret) instead of the
unsignaled fence.
[tomeu: Refactored error paths to use consolidated goto labels]
📍 영향받는 시스템
Linux kernel (accel/rocket 드라이버 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 특정 오류를 유도하여 시스템 자원(메모리 및 전력 관리)을 고갈시키는 방식
🛡️ 대응 방법
pm_runtime_get_sync()를 pm_runtime_resume_and_get()로 교체하여 오류 발생 시 자원이 자동으로 해제되도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 최신 패치 버전인지 확인합니다.