🇰🇷 한글 설명
Linux 커널의 media: amphion 드라이버에서 m2m 작업 중단(job_abort)과 장치 실행(device_run) 간의 경쟁 상태(Race Condition)로 인해 커널 패닉이 발생할 수 있는 취약점입니다. v4l2_m2m_ctx_release()가 컨텍스트를 해제하는 동안 v4l2_m2m_try_run()이 동일한 컨텍스트를 호출하여 Use-After-Free 오류를 유발합니다.
💡 쉬운 설명
컴퓨터의 영상 처리 장치를 사용하는 과정에서 두 가지 명령이 동시에 충돌하여 시스템이 갑자기 멈추거나 꺼질 수 있는 문제입니다. 이미 삭제된 데이터를 다시 사용하려고 시도할 때 발생하는 오류입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: amphion: Fix race between m2m job_abort and device_run
Fix kernel panic caused by race condition where v4l2_m2m_ctx_release()
frees m2m_ctx while v4l2_m2m_try_run() is about to call device_run
with the same context.
Race sequence:
v4l2_m2m_try_run(): v4l2_m2m_ctx_release():
lock/unlock v4l2_m2m_cancel_job()
job_abort()
v4l2_m2m_job_finish()
kfree(m2m_ctx) <- frees ctx
device_run() <- use-after-free crash at 0x538
Crash trace:
Unable to handle kernel read from unreadable memory at virtual address
0000000000000538
v4l2_m2m_try_run+0x78/0x138
v4l2_m2m_device_run_work+0x14/0x20
The amphion vpu driver does not rely on the m2m framework's device_run
callback to perform encode/decode operations.
Fix the race by preventing m2m framework job scheduling entirely:
- Add job_ready callback returning 0 (no jobs ready for m2m framework)
- Remove job_abort callback to avoid the race condition
📍 영향받는 시스템
Linux kernel (amphion VPU driver 사용 시스템)
⚔️ 공격 벡터
특정 시점에 m2m 작업 중단과 실행 명령을 동시에 유도하여 커널 패닉 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인