🇰🇷 한글 설명
Linux 커널의 accel/ivpu 드라이버에서 작업 제출(ivpu_job_submit) 시 잠금 순서가 잘못되어 교착 상태(deadlock)가 발생할 수 있습니다. 장애 발생 시 작업 중단 경로와 작업 제출 경로가 서로 반대 순서로 잠금을 획득하여 시스템이 멈출 수 있습니다. 잠금 순서를 변경하여 이를 해결했습니다.
💡 쉬운 설명
Linux 커널의 NPU(AI 가속기) 드라이버에서 두 작업이 서로 상대방이 가진 자물쇠를 기다리며 멈추는 문제가 있었습니다. 이를 해결하기 위해 자물쇠를 잡는 순서를 통일했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
accel/ivpu: Fix locking order in ivpu_job_submit
Fix deadlock in job submission and abort handling.
When a thread aborts currently executing jobs due to a fault,
it first locks the global lock protecting submitted_jobs (#1).
After the last job is destroyed, it proceeds to release the related context
and locks file_priv (#2). Meanwhile, in the job submission thread,
the file_priv lock (#2) is taken first, and then the submitted_jobs
lock (#1) is obtained when a job is added to the submitted jobs list.
CPU0 CPU1
---- ----
(for example due to a fault) (jobs submissions keep coming)
lock(&vdev->submitted_jobs_lock) #1
ivpu_jobs_abort_all()
job_destroy()
lock(&file_priv->lock) #2
lock(&vdev->submitted_jobs_lock) #1
file_priv_release()
lock(&vdev->context_list_lock)
lock(&file_priv->lock) #2
This order of locking causes a deadlock. To resolve this issue,
change the order of locking in ivpu_job_submit().
📍 영향받는 시스템
Linux 커널 accel/ivpu 드라이버를 사용하는 Intel NPU 탑재 시스템 (수정 전 커널 버전)
⚔️ 공격 벡터
로컬 사용자가 NPU 작업을 지속적으로 제출하면서 장애를 유발해 커널 교착 상태(서비스 거부)를 일으킬 수 있음
🛡️ 대응 방법
배포판에서 제공하는 최신 커널 보안 업데이트를 설치하고 재부팅하세요.
🔧 검증 코드
커널 버전이 해당 패치가 포함된 버전 이상이고 ivpu 모듈이 로드되지 않았다면 영향이 없으며, 모듈이 로드되어 있다면 배포판 보안 공지에서 패치 적용 여부를 확인하세요.
uname -r && (lsmod | grep -w ivpu || echo 'ivpu 모듈 미로드')