🇰🇷 한글 설명
Linux 커널의 dmaengine idxd 드라이버에서 파일 장치 설정 실패 시 정리 과정 중 데드락(Deadlock) 및 Use-After-Free 취약점이 발생합니다. 장치 설정 중 오류가 발생하면 락(Lock)을 해제하지 않은 상태에서 참조 카운트가 감소하여 시스템이 멈추거나, 이미 해제된 메모리 영역에 접근하여 커널 오류를 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 부품을 제어하는 소프트웨어에서 설정 오류가 발생했을 때, 시스템이 스스로를 멈추게 하거나 이미 사용이 끝난 메모리를 다시 건드려 오류를 일으키는 문제입니다. 이로 인해 시스템이 응답하지 않거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dmaengine: idxd: fix fdev setup failure cleanup in idxd_cdev_open()
The failed_dev_add and failed_dev_name paths drop the file-device
reference while wq->wq_lock is still held. If put_device(fdev) drops the
last reference, idxd_file_dev_release() runs synchronously and tries to
take wq->wq_lock again, deadlocking.
Those paths also fall through into the later ctx cleanup labels even
though idxd_file_dev_release() owns that cleanup and frees ctx. This can
make idxd_xa_pasid_remove(ctx) and kfree(ctx) operate on a freed context.
Move idxd_wq_get() before file-device setup can fail, since the release
callback always calls idxd_wq_put(). Then unlock wq->wq_lock before
put_device(fdev) and return directly from the file-device setup failure
path, leaving ctx cleanup to the release callback.
📍 영향받는 시스템
Linux kernel (dmaengine: idxd 드라이버 포함 버전)
⚔️ 공격 벡터
로컬 권한을 가진 사용자가 특정 장치 파일(idxd)에 접근을 시도하여 설정 오류를 유도함으로써 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인