data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2026-89974 in the interactive tracker

CVE-2026-89974

nvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails

7.5 EPSS 0.3% AV:A

Published 2026-09-16 (33 days ago) by the Linux kernel CNA. Subsystem drivers/nvme. Debian urgency: unimportant.

What to do, per Debian release

Debian's own status for CVE-2026-89974 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source

ReleaseStatus VersionWhat this means
Debian 12bookwormnot affected6.1.190-1Nothing to do. bookworm never shipped the vulnerable code.
Debian 13trixiefixedDSA-6528-1 · 2026-09-29 · text6.12.111-1Update the kernel and reboot. DSA-6528-1 shipped the fix on 2026-09-29, in 6.12.111-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed7.2.6-1Update the kernel and reboot. Fixed in 7.2.6-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed7.2.6-1Update the kernel and reboot. Fixed in 7.2.6-1. A running kernel keeps the old code until the machine restarts.
Debian 12bookworm · linux-6.12fixedDLA-4817-1 · 2026-10-04 · text6.12.111-1~deb12u1Update the kernel and reboot. DLA-4817-1 shipped the fix on 2026-10-04, in 6.12.111-1~deb12u1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

nvmf_create_ctrl() owns the fabrics options and frees them whenever ->create_ctrl() returns an error, so a transport must not free them on its own error paths. nvme-fc tracks this by testing ctrl->ctrl.opts in nvme_fc_ctrl_free(), which requires nvme_fc_init_ctrl() to clear that pointer on every error exit. The coupling is implicit, and commit 1a9e218195a5 ("nvme: split device add from initialization") broke it by adding a second error exit. When nvme_add_ctrl() fails, nvme_fc_init_ctrl() jumps to out_put_ctrl:, past the "ctrl->ctrl.opts = NULL" that only sits on the fail_ctrl: path, so nvme_fc_ctrl_free() frees the options and nvmf_create_ctrl() frees them a second time: BUG: KASAN: slab-use-after-free in nvmf_free_options+0x30/0x190 nvmf_free_options+0x30/0x190 drivers/nvme/host/fabrics.c:1284 nvmf_create_ctrl drivers/nvme/host/fabrics.c:1374 [inline] Freed by task 5534: nvme_fc_ctrl_free drivers/nvme/host/fc.c:2374 [inline] nvme_fc_init_ctrl+0xe17/0x1450 drivers/nvme/host/fc.c:3605 nvme_add_ctrl() fails when dev_set_name() cannot allocate, so this is reachable under memory pressure or fault injection. Without KASAN the options are freed twice. Rather than clear the pointer on the second exit as well, derive ownership the way nvme-tcp, nvme-rdma and nvme-loop do, from list membership: their free_ctrl leaves the options alone unless the controller made it onto the transport list. The list cannot simply be populated on the success path as it is there. nvme-fc runs the initial connect synchronously via flush_delayed_work(), and the controller has to be reachable on rport->ctrl_list for the whole of it: nvme_fc_unregister_remoteport() needs to find it to signal connectivity loss, nvme_fc_match_disconn_ls() matches an incoming Disconnect Association LS against ctrl->association_id, which is only assigned during that window, nvme_fc_resume_controller() needs it on remoteport re-registration, and nvme_fc_existing_controller() uses it to reject a duplicate connect racing the one in flight. Keep the insertion where it is and add a fail_unlist: label, falling into fail_ctrl:, for the error paths that run after it. The earlier error paths never reach the insertion and keep using fail_ctrl: directly, so the list is only touched where the controller is actually on it. nvme_fc_ctrl_free() cannot use the plain "goto free_ctrl" the other transports use, because it still has to put_device(), release the rport reference and free the ida entry for resources taken before the insertion. Sample list_empty() under rport->lock instead. ctrl->ctrl.opts also stays valid for the whole teardown now. That is not the bug being fixed, but it removes some fragility around the old idiom: nvme_free_ctrl() calls nvme_auth_free() before ->free_ctrl(), and ctrl_max_dhchaps() dereferences ctrl->opts without a NULL check when ctrl->dhchap_ctxs is set, which nvme-fc permits since NVMF_ALLOWED_OPTS allows the dhchap options. The nvme sysfs attributes that dereference ctrl->opts, such as hostnqn and address, evaluate their is_visible() test once at device_add() time and stay readable until cdev_device_del().

Where it lives

The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.

drivers/nvme/host/fc.c

What this is
NVM EXPRESS FC TRANSPORT DRIVERSMAINTAINERS section matched on drivers/nvme/host/fc.c · linux-nvme@lists.infradead.org · Supported
Kernel module
nvme_fc

Check it on the machine

grep -w CONFIG_NVME_FC /boot/config-$(uname -r)

Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.

lsmod | grep -w nvme_fc

Prints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.

Show whether Debian builds this, per release

Debian builds this as a loadable module. Every release below compiles it as a module on every flavour, so whether the code is in the running kernel depends on whether that module is loaded.

  • bookworm, trixie, forky, sid, bookworm · linux-6.12m
m
a loadable module on every flavour - check lsmod, can be blacklisted
Build switch
CONFIG_NVME_FC

From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages

Signals

Published
2026-09-16 (33 days ago)source
CVSS
7.5 high
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:Hsource recompute it
Attack vector
adjacent network (AV:A)source
EPSS
0.29%, higher than 19.9% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
unimportantsource
Subsystem
drivers/nvme

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
6.116.12.1108bd14aa06511
6.116.18.517df913a7ced5
6.117.2.55f89d68c00cc
6.117.356e6279266f6

Debian advisories

AdvisoryDateShipped toDebian
DLA-4817-12026-10-04bookworm 6.12.111-1~deb12u1tracker
DSA-6528-12026-09-29trixie 6.12.111-1tracker

Why the CNA scored it this way

Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source

AV:AAttack vector, adjacent network
A rogue NVMe-FC target on the Fibre Channel SAN causes nvme-cli udev autoconnect (FC_EVENT=nvmediscovery runs nvmf-connect, which writes /dev/nvme-fabrics and reaches nvme_fc_init_ctrl). FC/FCoE is a non-routable storage fabric, so this is Adjacent, matching prior nvme-fc scores.
AC:HAttack complexity, high
The double-free runs only when nvme_add_ctrl() fails in dev_set_name() or cdev_device_add(), which the fix notes is reached under memory pressure or failslab. A fabric peer can provoke the connect but cannot reliably force that GFP_KERNEL/sysfs allocation to fail.
PR:NPrivileges required, none
The attacker is an unauthenticated NVMe-FC peer; udev/systemd nvmf-autoconnect writes /dev/nvme-fabrics as root, and NVMe-FC does not authenticate the remote port, so no host account or capability is required.
UI:NUser interaction, none
nvmf-autoconnect and nvmefc-boot-connections invoke nvme connect automatically on FC discovery and boot, so no administrator or interactive user action is required at exploit time.
S:UScope, unchanged
The double-free corrupts the kernel slab allocator and nvmf_ctrl_options inside the host kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.
C:HConfidentiality impact, high
After nvme_fc_ctrl_free() kfree's opts, nvmf_create_ctrl() calls nvmf_free_options() which reads opts->host, keyring, tls_key, and the option string pointers from freed, sprayable heap, giving an arbitrary kernel read primitive.
I:HIntegrity impact, high
The second nvmf_free_options() kfree's those reclaimed pointers and the opts object itself (slab double-free of nvmf_ctrl_options), enabling allocator metadata corruption, an arbitrary-free primitive, and control-flow hijack via heap grooming.
A:HAvailability impact, high
KASAN reports slab-use-after-free in nvmf_free_options(); without KASAN the double-free of opts and its member strings oopses or panics the kernel.