🇰🇷 한글 설명
Linux 커널의 QAT(QuickAssist Technology) 드라이버에서 6xxx 프로브 실패 시 IRQ 정리 과정에 결함이 발견되었습니다. adf_dev_up() 함수가 부분적으로 성공한 후 실패할 경우, MSI-X 벡터가 해제되기 전에 등록된 IRQ 핸들러가 제대로 분리되지 않아 리소스 누수가 발생합니다.
💡 쉬운 설명
장치를 작동시키려다 실패했을 때, 사용하던 통로(IRQ)를 제대로 닫지 않고 연결만 끊어버리는 문제입니다. 이로 인해 시스템에 불필요한 데이터 찌꺼기가 남거나 경고 메시지가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
crypto: qat - fix IRQ cleanup on 6xxx probe failure
When adf_dev_up() partially completes and then fails, the IRQ
handlers registered during adf_isr_resource_alloc() are not detached
before the MSI-X vectors are released.
Since the device is enabled with pcim_enable_device(), calling
pci_alloc_irq_vectors() internally registers pcim_msi_release() as a
devres action. On probe failure, devres runs pcim_msi_release() which
calls pci_free_irq_vectors(), tearing down the MSI-X vectors while IRQ
handlers (for example 'qat0-bundle0') are still attached. This causes
remove_proc_entry() warnings:
[ 22.163964] remove_proc_entry: removing non-empty directory 'irq/143', leaking at least 'qat0-bundle0'
Moving the devm_add_action_or_reset() before adf_dev_up() does not solve
the problem since devres runs in LIFO order and pcim_msi_release(),
registered later inside adf_dev_up(), would still fire before
adf_device_down().
Fix by calling adf_dev_down() explicitly when adf_dev_up() fails, to
properly free IRQ handlers before devres releases the MSI-X vectors.
📍 영향받는 시스템
Linux kernel (QAT driver 사용 환경)
⚔️ 공격 벡터
로컬 시스템에서 하드웨어 프로브 실패를 유도하여 리소스 누수 유발 (Denial of Service 가능성)
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 adf_dev_up() 실패 시 adf_dev_down()이 명시적으로 호출되도록 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.