🔍 CVE-2026-80787

0.0
CVSS Score
UNKNOWN
2026-09-04
2026-10-19 09:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 nvmet: pci-epf 구성 요소에서 nvmet_pci_epf_exec_iod_work() 함수 호출 시 Use-After-Free 취약점이 발생합니다. I/O 명령 실행 후 데이터 전송 여부를 확인하기 위해 iod 구조체에 접근하기 전에, 비동기적으로 명령이 완료되어 해당 메모리가 해제될 수 있는 문제입니다.

💡 쉬운 설명

컴퓨터가 데이터를 처리하는 도중에 이미 사용이 끝난 메모리 공간을 다시 읽으려고 시도하여 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 예상치 못한 동작을 할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: nvmet: pci-epf: fix use-after-free in nvmet_pci_epf_exec_iod_work() nvmet_pci_epf_exec_iod_work() submits an I/O command with req->execute() and then waits for the command to complete and transfers the data back to the host. This wait is not needed for commands that do not transfer data from the device to the host. To decide whether that wait is needed, it reads iod->data_len and iod->dma_dir after calling req->execute(). However, once req->execute() is called, the command may complete asynchronously on another CPU. For commands that do not require a device-to-host data transfer, nvmet_pci_epf_queue_response() calls nvmet_pci_epf_complete_iod() directly, which can free the iod before it reads iod->data_len and iod->dma_dir, resulting in the KFENCE use-after- free: BUG: KFENCE: use-after-free read in nvmet_pci_epf_exec_iod_work+0x288/0x798 [nvmet_pci_epf] Use-after-free read at 0x00000000fdfa6d03 (in kfence-#63): nvmet_pci_epf_exec_iod_work+0x288/0x798 [nvmet_pci_epf] process_one_work+0x15c/0x4f0 worker_thread+0x18c/0x30c kthread+0x130/0x140 ret_from_fork+0x10/0x20 kfence-#63: 0x00000000e3de0e71-0x00000000c938ad62, size=712, cache=kmalloc-1k allocated by task 10 on cpu 0 at 73.995480s (0.005122s ago): mempool_kmalloc+0x1c/0x28 mempool_alloc_noprof+0x40/0x9c nvmet_pci_epf_poll_sqs_work+0xd4/0x344 [nvmet_pci_epf] process_one_work+0x15c/0x4f0 worker_thread+0x18c/0x30c kthread+0x130/0x140 ret_from_fork+0x10/0x20 freed by task 131 on cpu 3 at 73.995521s (0.008385s ago): mempool_kfree+0x10/0x20 mempool_free+0x44/0x64 nvmet_pci_epf_free_iod+0x88/0x98 [nvmet_pci_epf] nvmet_pci_epf_cq_work+0xfc/0x280 [nvmet_pci_epf] process_one_work+0x15c/0x4f0 worker_thread+0x18c/0x30c kthread+0x130/0x140 ret_from_fork+0x10/0x20 Fix this by referring to iod->data_len and iod->dma_dir before calling req->execute(). The remaining iod accesses such as iod->status are only reached on the device-to-host read path. In this case, nvmet_pci_epf_queue_response() signals iod->done instead of freeing the iod, so the iod stays valid.

📍 영향받는 시스템

Linux Kernel (nvmet: pci-epf 모듈 사용 환경)

⚔️ 공격 벡터

특수하게 조작된 I/O 명령을 통해 비동기적으로 명령을 완료시켜 메모리 해제를 유도하는 방식

🛡️ 대응 방법

req->execute()를 호출하기 전에 iod->data_len 및 iod->dma_dir 값을 먼저 참조하도록 커널 패치 적용

🔧 검증 코드

현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 최신 보안 패치 버전인지 확인합니다.

Shell / Script
uname -r

💻 영향받는 소프트웨어

Linux Kernel