🔍 CVE-2025-38209

9.8
CVSS Score
CRITICAL
2025-07-04
2026-10-15 22:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 nvme-tcp 구성 중 두 번째 관리 큐 설정이 실패할 경우, 할당된 태그 세트가 적절히 해제되지 않아 발생하는 Slab-use-after-free 취약점입니다. 이로 인해 시스템의 메모리 관리 오류가 발생하며 커널 패닉이나 보안 위협을 초래할 수 있습니다.

💡 쉬운 설명

컴퓨터의 저장 장치 연결 설정 중 오류가 발생했을 때, 사용하던 메모리를 제대로 정리하지 못해 발생하는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 해킹에 취약해질 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: nvme-tcp: remove tag set when second admin queue config fails Commit 104d0e2f6222 ("nvme-fabrics: reset admin connection for secure concatenation") modified nvme_tcp_setup_ctrl() to call nvme_tcp_configure_admin_queue() twice. The first call prepares for DH-CHAP negotitation, and the second call is required for secure concatenation. However, this change triggered BUG KASAN slab-use-after- free in blk_mq_queue_tag_busy_iter(). This BUG can be recreated by repeating the blktests test case nvme/063 a few times [1]. When the BUG happens, nvme_tcp_create_ctrl() fails in the call chain below: nvme_tcp_create_ctrl() nvme_tcp_alloc_ctrl() new=true ... Alloc nvme_tcp_ctrl and admin_tag_set nvme_tcp_setup_ctrl() new=true nvme_tcp_configure_admin_queue() new=true ... Succeed nvme_alloc_admin_tag_set() ... Alloc the tag set for admin_tag_set nvme_stop_keep_alive() nvme_tcp_teardown_admin_queue() remove=false nvme_tcp_configure_admin_queue() new=false nvme_tcp_alloc_admin_queue() ... Fail, but do not call nvme_remove_admin_tag_set() nvme_uninit_ctrl() nvme_put_ctrl() ... Free up the nvme_tcp_ctrl and admin_tag_set The first call of nvme_tcp_configure_admin_queue() succeeds with new=true argument. The second call fails with new=false argument. This second call does not call nvme_remove_admin_tag_set() on failure, due to the new=false argument. Then the admin tag set is not removed. However, nvme_tcp_create_ctrl() assumes that nvme_tcp_setup_ctrl() would call nvme_remove_admin_tag_set(). Then it frees up struct nvme_tcp_ctrl which has admin_tag_set field. Later on, the timeout handler accesses the admin_tag_set field and causes the BUG KASAN slab-use-after-free. To not leave the admin tag set, call nvme_remove_admin_tag_set() when the second nvme_tcp_configure_admin_queue() call fails. Do not return from nvme_tcp_setup_ctrl() on failure. Instead, jump to "destroy_admin" go-to label to call nvme_tcp_teardown_admin_queue() which calls nvme_remove_admin_tag_set().

📍 영향받는 시스템

Linux Kernel (nvme-tcp 구성 요소가 포함된 버전)

⚔️ 공격 벡터

특수하게 조작된 NVMe-over-TCP 연결 요청을 통해 관리 큐 설정 실패를 유도하여 메모리 오류 발생

🛡️ 대응 방법

커널 패치(Commit 104d0e2f6222 관련 수정 사항)를 적용하여 관리 큐 설정 실패 시 태그 세트가 정상적으로 제거되도록 업데이트

🔧 검증 코드

출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전이 적용되었는지 확인

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel