🔍 CVE-2025-37843

5.5
CVSS Score
MEDIUM
2025-05-09
2026-11-05 21:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 PCI pciehp 드라이버에서, 중첩된 PCI 핫플러그 포트를 제거할 때 pci_lock_rescan_remove() 락 획득 순서로 인해 데드락이 발생할 수 있는 문제입니다. 최근 커밋(9d573d19547b)이 시스템 절전 중 장치 교체 감지 로직을 추가하면서 Thunderbolt 장치를 여러 개 제거할 때 이 데드락이 더 자주 발생했고, 이를 완화하기 위해 상위 핫플러그 포트가 제거되었는지 먼저 확인하도록 수정되었습니다.

💡 쉬운 설명

썬더볼트 같은 장치를 여러 개 연결한 상태에서 시스템이 절전 모드로 들어가거나 장치를 뽑을 때, 커널 내부의 두 작업이 서로 기다리다가 멈춰버릴 수 있습니다. 이번 수정은 이런 멈춤이 자주 생기지 않도록 불필요한 검사를 건너뛰게 만듭니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: PCI: pciehp: Avoid unnecessary device replacement check Hot-removal of nested PCI hotplug ports suffers from a long-standing race condition which can lead to a deadlock: A parent hotplug port acquires pci_lock_rescan_remove(), then waits for pciehp to unbind from a child hotplug port. Meanwhile that child hotplug port tries to acquire pci_lock_rescan_remove() as well in order to remove its own children. The deadlock only occurs if the parent acquires pci_lock_rescan_remove() first, not if the child happens to acquire it first. Several workarounds to avoid the issue have been proposed and discarded over the years, e.g.: https://lore.kernel.org/r/4c882e25194ba8282b78fe963fec8faae7cf23eb.1529173804.git.lukas@wunner.de/ A proper fix is being worked on, but needs more time as it is nontrivial and necessarily intrusive. Recent commit 9d573d19547b ("PCI: pciehp: Detect device replacement during system sleep") provokes more frequent occurrence of the deadlock when removing more than one Thunderbolt device during system sleep. The commit sought to detect device replacement, but also triggered on device removal. Differentiating reliably between replacement and removal is impossible because pci_get_dsn() returns 0 both if the device was removed, as well as if it was replaced with one lacking a Device Serial Number. Avoid the more frequent occurrence of the deadlock by checking whether the hotplug port itself was hot-removed. If so, there's no sense in checking whether its child device was replaced. This works because the ->resume_noirq() callback is invoked in top-down order for the entire hierarchy: A parent hotplug port detecting device replacement (or removal) marks all children as removed using pci_dev_set_disconnected() and a child hotplug port can then reliably detect being removed.

📍 영향받는 시스템

Linux 커널 PCI pciehp 드라이버를 사용하는 시스템 (수정 커밋 9d573d19547b 이후 버전, 해당 패치 적용 전 커널)

⚔️ 공격 벡터

로컬 물리적 접근 또는 장치 핫플러그/절전 전환 시 발생하는 서비스 거부(교착 상태)로, 원격 공격 경로는 확인되지 않음

🛡️ 대응 방법

배포판의 최신 커널 업데이트를 적용하여 해당 패치가 포함된 버전으로 재부팅

🔧 검증 코드

출력된 커널 버전이 배포판이 제공하는 패치된 버전(예: 해당 보안 공지에 명시된 이후 버전) 이상인지 배포판 보안 공지와 비교하여 확인하며, 패치 여부가 불명확하면 패키지 관리자의 changelog로 CVE-2025-37843 포함 여부를 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Linux Kernel