🇰🇷 한글 설명
Linux kernel의 NVMe/FC 컨트롤러 초기화 중 오류 발생 시 관리 태그셋 메모리가 해제되지 않아 메모리 누수가 발생하는 취약점입니다. 컨트롤러 설정 단계에서 중단되면 할당된 admin blk-mq 리소스가 정리되지 않아 누적됩니다.
💡 쉬운 설명
Linux에서 저장장치 제어 중 오류 발생 시 메모리가 돌아오지 않는 문제입니다. 반복되면 시스템 메모리가 점점 줄어듭니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nvme-fc: release admin tagset if init fails
nvme_fabrics creates an NVMe/FC controller in following path:
nvmf_dev_write()
-> nvmf_create_ctrl()
-> nvme_fc_create_ctrl()
-> nvme_fc_init_ctrl()
nvme_fc_init_ctrl() allocates the admin blk-mq resources right after
nvme_add_ctrl() succeeds. If any of the subsequent steps fail (changing
the controller state, scheduling connect work, etc.), we jump to the
fail_ctrl path, which tears down the controller references but never
frees the admin queue/tag set. The leaked blk-mq allocations match the
kmemleak report seen during blktests nvme/fc.
Check ctrl->ctrl.admin_tagset in the fail_ctrl path and call
nvme_remove_admin_tag_set() when it is set so that all admin queue
allocations are reclaimed whenever controller setup aborts.
📍 영향받는 시스템
NVMe/FC(Fibre Channel) 지원하는 Linux kernel 시스템
⚔️ 공격 벡터
NVMe/FC 컨트롤러 초기화 실패 시나리오를 반복 트리거하여 메모리 누수 발생
🛡️ 대응 방법
최신 Linux kernel 패치 적용 (nvme_remove_admin_tag_set() 호출을 fail_ctrl 경로에 추가)
🔧 검증 코드
CONFIG_NVME_FC=y가 나오면 시스템에서 NVMe/FC가 활성화되어 있습니다. dmesg에서 nvme_fc 관련 메시지가 없으면 해당 모듈이 로드되지 않은 상태입니다.
grep -i CONFIG_NVME_FC /boot/config-$(uname -r) 2>/dev/null || dmesg | grep -i nvme_fc | head -1