CVE-2025-39945
- 공개
- 2025년 10월 4일
- 수정
- 2026년 10월 20일
- 조회
- 0
- 상태
- Modified
개요
이 취약점이 무엇인지
In the Linux kernel, the following vulnerability has been resolved:
cnic: Fix use-after-free bugs in cnic_delete_task
The original code uses cancel_delayed_work() in cnic_cm_stop_bnx2x_hw(), which does not guarantee that the delayed work item 'delete_task' has fully completed if it was already running. Additionally, the delayed work item is cyclic, the flush_workqueue() in cnic_cm_stop_bnx2x_hw() only blocks and waits for work items that were already queued to the workqueue prior to its invocation. Any work items submitted after flush_workqueue() is called are not included in the set of tasks that the flush operation awaits. This means that after the cyclic work items have finished executing, a delayed work item may still exist in the workqueue. This leads to use-after-free scenarios where the cnic_dev is deallocated by cnic_free_dev(), while delete_task remains active and attempt to dereference cnic_dev in cnic_delete_task().
A typical race condition is illustrated below:
CPU 0 (cleanup) | CPU 1 (delayed work callback) cnic_netdev_event() | cnic_stop_hw() | cnic_delete_task() cnic_cm_stop_bnx2x_hw() | ... cancel_delayed_work() | /* the queue_delayed_work() flush_workqueue() | executes after flush_workqueue()*/ | queue_delayed_work() cnic_free_dev(dev)//free | cnic_delete_task() //new instance | dev = cp->dev; //use
Replace cancel_delayed_work() with cancel_delayed_work_sync() to ensure that the cyclic delayed work item is properly canceled and that any ongoing execution of the work item completes before the cnic_dev is deallocated. Furthermore, since cancel_delayed_work_sync() uses __flush_work(work, true) to synchronously wait for any currently executing instance of the work item to finish, the flush_workqueue() becomes redundant and should be removed.
This bug was identified through static analysis. To reproduce the issue and validate the fix, I simulated the cnic PCI device in QEMU and introduced intentional delays — such as inserting calls to ssleep() within the cnic_delete_task() function — to increase the likelihood of triggering the bug.
실제 악용 사례 · 아직 확인된 사례가 없어요
CISA의 KEV 카탈로그(실제 공격에 악용된 취약점 목록)에 아직 올라와 있지 않아요. 다만 ‘앞으로도 안전하다’는 뜻은 아니니 심각도와 EPSS를 함께 확인하세요.
패치 현황
어떤 버전이 위험하고, 몇 버전으로 올리면 되는지
| 제품 | 시작 | 끝 | 이 버전 이상으로 | |||
|---|---|---|---|---|---|---|
| linux_kernellinux | 2.6.37 | ≤ | 취약 | < | 5.4.300 | 5.4.300이상 |
| 5.5 | ≤ | 취약 | < | 5.10.245 | 5.10.245이상 | |
| 5.11 | ≤ | 취약 | < | 5.15.194 | 5.15.194이상 | |
| 5.16 | ≤ | 취약 | < | 6.1.154 | 6.1.154이상 | |
| 6.2 | ≤ | 취약 | < | 6.6.108 | 6.6.108이상 | |
| 6.7 | ≤ | 취약 | < | 6.12.49 | 6.12.49이상 | |
| 6.13 | ≤ | 취약 | < | 6.16.9 | 6.16.9이상 | |
| 이 버전만 | 취약 | = | 6.17 rc1 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | 6.17 rc2 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | 6.17 rc3 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | 6.17 rc4 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | 6.17 rc5 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | 6.17 rc6 | 벤더 공지 확인 | ||
NVD 분석 기준. 시작과 끝 사이 버전이 취약해요. ‘이 버전 이상으로’는 끝이 ‘<’로 적힌 경우에만 알 수 있어요.
할당 기관(CNA)이 적은 버전 10줄도 보기
| 제품 | 시작 | 끝 | 이 버전 이상으로 | |||
|---|---|---|---|---|---|---|
| LinuxLinux | 이 버전만 | 취약 | = | 2.6.37 | 벤더 공지 확인 | |
| 최초 버전 | ≤ | 영향 없음 | < | 2.6.37 | — | |
| 5.4.300 | ≤ | 영향 없음 | ≤ | 5.4.* | — | |
| 5.10.245 | ≤ | 영향 없음 | ≤ | 5.10.* | — | |
| 5.15.194 | ≤ | 영향 없음 | ≤ | 5.15.* | — | |
| 6.1.154 | ≤ | 영향 없음 | ≤ | 6.1.* | — | |
| 6.6.108 | ≤ | 영향 없음 | ≤ | 6.6.* | — | |
| 6.12.49 | ≤ | 영향 없음 | ≤ | 6.12.* | — | |
| 6.16.9 | ≤ | 영향 없음 | ≤ | 6.16.* | — | |
| 6.17 | ≤ | 영향 없음 | ≤ | 최신 버전 | — | |
참고 링크
NVD에 등록된 외부 자료예요. 익스플로잇·벤더 공지·패치 순으로 먼저 보여줘요.
패치8
- git.kernel.org/stable/c/0405055930264ea8fd26f4131466fa7652e5e47d
- git.kernel.org/stable/c/0627e1481676669cae2df0d85b5ff13e7d24c390
- git.kernel.org/stable/c/6e33a7eed587062ca8161ad1f4584882a860d697
- git.kernel.org/stable/c/7b6a5b0a6b392263c3767fc945b311ea04b34bbd
- git.kernel.org/stable/c/8eeb2091e72d75df8ceaa2172638d61b4cf8929a