nvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails
CVE-2026-89974 is fixed in 37 products on 1 platform, first by DEBIAN-CVE-2026-89974, released September 23, 2026. It is not reported as exploited. Patch Radar priority: High.
In the Linux kernel, the following vulnerability has been resolved: nvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails 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's fixed
| Product | Fixed in | Fix | Released |
|---|---|---|---|
| Linux | |||
| kernel-uek · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-core · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-core · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-core · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-core · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-devel · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-devel · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-core · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-core · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-deprecated · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-deprecated · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-desktop · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-desktop · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-extra · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-extra · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-extra-netfilter · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-extra-netfilter · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-usb · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-usb · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-wireless · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-debug-modules-wireless · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-devel · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-devel · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-doc · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-doc · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-core · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-core · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-deprecated · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-deprecated · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-desktop · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-desktop · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-extra · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-extra · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-extra-netfilter · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-extra-netfilter · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-usb · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-usb · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-wireless · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-modules-wireless · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-tools · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek-tools · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-core · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-core · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-devel · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-devel · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-core · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-core · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-deprecated · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-deprecated · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-desktop · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-desktop · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-extra · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-extra · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-extra-netfilter · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-extra-netfilter · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-usb · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-usb · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-wireless · ol 10 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| kernel-uek64k-modules-wireless · ol 9 | 0:6.12.0-207.111.5.1.el9uek | ELSA-2026-500374 | Oct 7, 2026 |
| linux · Debian 13.5 (trixie) | 6.12.111-1 | DEBIAN-CVE-2026-89974 | Sep 23, 2026 |
| linux · Debian 14 | 7.2.6-1 | DEBIAN-CVE-2026-89974 | Sep 23, 2026 |
| linux-6.12 · Debian 12.15 (bookworm) | 6.12.111-1~deb12u1 | DEBIAN-CVE-2026-89974 | Sep 23, 2026 |
Patch Radar data is free to use with attribution. Terms and how to credit it.
Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.