{"api_version":"1","generated_at":"2026-09-17T05:11:42+00:00","cve":"CVE-2026-89974","urls":{"html":"https://cve.report/CVE-2026-89974","api":"https://cve.report/api/cve/CVE-2026-89974.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-89974","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-89974"},"summary":{"title":"nvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails\n\nnvmf_create_ctrl() owns the fabrics options and frees them whenever\n->create_ctrl() returns an error, so a transport must not free them on\nits own error paths.  nvme-fc tracks this by testing ctrl->ctrl.opts in\nnvme_fc_ctrl_free(), which requires nvme_fc_init_ctrl() to clear that\npointer on every error exit.\n\nThe coupling is implicit, and commit 1a9e218195a5 (\"nvme: split device\nadd from initialization\") broke it by adding a second error exit.  When\nnvme_add_ctrl() fails, nvme_fc_init_ctrl() jumps to out_put_ctrl:, past\nthe \"ctrl->ctrl.opts = NULL\" that only sits on the fail_ctrl: path, so\nnvme_fc_ctrl_free() frees the options and nvmf_create_ctrl() frees them\na second time:\n\n  BUG: KASAN: slab-use-after-free in nvmf_free_options+0x30/0x190\n   nvmf_free_options+0x30/0x190 drivers/nvme/host/fabrics.c:1284\n   nvmf_create_ctrl drivers/nvme/host/fabrics.c:1374 [inline]\n  Freed by task 5534:\n   nvme_fc_ctrl_free drivers/nvme/host/fc.c:2374 [inline]\n   nvme_fc_init_ctrl+0xe17/0x1450 drivers/nvme/host/fc.c:3605\n\nnvme_add_ctrl() fails when dev_set_name() cannot allocate, so this is\nreachable under memory pressure or fault injection.  Without KASAN the\noptions are freed twice.\n\nRather than clear the pointer on the second exit as well, derive\nownership the way nvme-tcp, nvme-rdma and nvme-loop do, from list\nmembership: their free_ctrl leaves the options alone unless the\ncontroller made it onto the transport list.\n\nThe list cannot simply be populated on the success path as it is there.\nnvme-fc runs the initial connect synchronously via flush_delayed_work(),\nand the controller has to be reachable on rport->ctrl_list for the whole\nof it: nvme_fc_unregister_remoteport() needs to find it to signal\nconnectivity loss, nvme_fc_match_disconn_ls() matches an incoming\nDisconnect Association LS against ctrl->association_id, which is only\nassigned during that window, nvme_fc_resume_controller() needs it on\nremoteport re-registration, and nvme_fc_existing_controller() uses it to\nreject a duplicate connect racing the one in flight.\n\nKeep the insertion where it is and add a fail_unlist: label, falling\ninto fail_ctrl:, for the error paths that run after it.  The earlier\nerror paths never reach the insertion and keep using fail_ctrl:\ndirectly, so the list is only touched where the controller is actually\non it.\n\nnvme_fc_ctrl_free() cannot use the plain \"goto free_ctrl\" the other\ntransports use, because it still has to put_device(), release the rport\nreference and free the ida entry for resources taken before the\ninsertion.  Sample list_empty() under rport->lock instead.\n\nctrl->ctrl.opts also stays valid for the whole teardown now.  That is\nnot the bug being fixed, but it removes some fragility around the old\nidiom: nvme_free_ctrl() calls nvme_auth_free() before ->free_ctrl(), and\nctrl_max_dhchaps() dereferences ctrl->opts without a NULL check when\nctrl->dhchap_ctxs is set, which nvme-fc permits since NVMF_ALLOWED_OPTS\nallows the dhchap options.  The nvme sysfs attributes that dereference\nctrl->opts, such as hostnqn and address, evaluate their is_visible()\ntest once at device_add() time and stay readable until\ncdev_device_del().","state":"PUBLISHED","assigner":"Linux","published_at":"2026-09-16 11:17:08","updated_at":"2026-09-16 15:18:21"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.5","severity":"HIGH","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":7.5,"baseSeverity":"HIGH","attackVector":"ADJACENT_NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.5","severity":"HIGH","vector":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.5,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/7df913a7ced5d7349f0b23bdcf25ad54fe83a1c1","name":"https://git.kernel.org/stable/c/7df913a7ced5d7349f0b23bdcf25ad54fe83a1c1","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/8bd14aa065112b4d523bea690027c7527a6224f6","name":"https://git.kernel.org/stable/c/8bd14aa065112b4d523bea690027c7527a6224f6","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/56e6279266f6962bb2d38a54397e3c605165b0c5","name":"https://git.kernel.org/stable/c/56e6279266f6962bb2d38a54397e3c605165b0c5","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5f89d68c00ccd1b25151da0bf660012380c2bad9","name":"https://git.kernel.org/stable/c/5f89d68c00ccd1b25151da0bf660012380c2bad9","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-89974","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-89974","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a9e218195a55d0a31e8cbe263aa2f618580ef1d 8bd14aa065112b4d523bea690027c7527a6224f6 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a9e218195a55d0a31e8cbe263aa2f618580ef1d 7df913a7ced5d7349f0b23bdcf25ad54fe83a1c1 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a9e218195a55d0a31e8cbe263aa2f618580ef1d 5f89d68c00ccd1b25151da0bf660012380c2bad9 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a9e218195a55d0a31e8cbe263aa2f618580ef1d 56e6279266f6962bb2d38a54397e3c605165b0c5 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.11","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.11 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.110 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.51 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2.5 7.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3-rc2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/nvme/host/fc.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"8bd14aa065112b4d523bea690027c7527a6224f6","status":"affected","version":"1a9e218195a55d0a31e8cbe263aa2f618580ef1d","versionType":"git"},{"lessThan":"7df913a7ced5d7349f0b23bdcf25ad54fe83a1c1","status":"affected","version":"1a9e218195a55d0a31e8cbe263aa2f618580ef1d","versionType":"git"},{"lessThan":"5f89d68c00ccd1b25151da0bf660012380c2bad9","status":"affected","version":"1a9e218195a55d0a31e8cbe263aa2f618580ef1d","versionType":"git"},{"lessThan":"56e6279266f6962bb2d38a54397e3c605165b0c5","status":"affected","version":"1a9e218195a55d0a31e8cbe263aa2f618580ef1d","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/nvme/host/fc.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.11"},{"lessThan":"6.11","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.110","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.51","versionType":"semver"},{"lessThanOrEqual":"7.2.*","status":"unaffected","version":"7.2.5","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.3-rc2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.110","versionStartIncluding":"6.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.51","versionStartIncluding":"6.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2.5","versionStartIncluding":"6.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3-rc2","versionStartIncluding":"6.11","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails\n\nnvmf_create_ctrl() owns the fabrics options and frees them whenever\n->create_ctrl() returns an error, so a transport must not free them on\nits own error paths.  nvme-fc tracks this by testing ctrl->ctrl.opts in\nnvme_fc_ctrl_free(), which requires nvme_fc_init_ctrl() to clear that\npointer on every error exit.\n\nThe coupling is implicit, and commit 1a9e218195a5 (\"nvme: split device\nadd from initialization\") broke it by adding a second error exit.  When\nnvme_add_ctrl() fails, nvme_fc_init_ctrl() jumps to out_put_ctrl:, past\nthe \"ctrl->ctrl.opts = NULL\" that only sits on the fail_ctrl: path, so\nnvme_fc_ctrl_free() frees the options and nvmf_create_ctrl() frees them\na second time:\n\n  BUG: KASAN: slab-use-after-free in nvmf_free_options+0x30/0x190\n   nvmf_free_options+0x30/0x190 drivers/nvme/host/fabrics.c:1284\n   nvmf_create_ctrl drivers/nvme/host/fabrics.c:1374 [inline]\n  Freed by task 5534:\n   nvme_fc_ctrl_free drivers/nvme/host/fc.c:2374 [inline]\n   nvme_fc_init_ctrl+0xe17/0x1450 drivers/nvme/host/fc.c:3605\n\nnvme_add_ctrl() fails when dev_set_name() cannot allocate, so this is\nreachable under memory pressure or fault injection.  Without KASAN the\noptions are freed twice.\n\nRather than clear the pointer on the second exit as well, derive\nownership the way nvme-tcp, nvme-rdma and nvme-loop do, from list\nmembership: their free_ctrl leaves the options alone unless the\ncontroller made it onto the transport list.\n\nThe list cannot simply be populated on the success path as it is there.\nnvme-fc runs the initial connect synchronously via flush_delayed_work(),\nand the controller has to be reachable on rport->ctrl_list for the whole\nof it: nvme_fc_unregister_remoteport() needs to find it to signal\nconnectivity loss, nvme_fc_match_disconn_ls() matches an incoming\nDisconnect Association LS against ctrl->association_id, which is only\nassigned during that window, nvme_fc_resume_controller() needs it on\nremoteport re-registration, and nvme_fc_existing_controller() uses it to\nreject a duplicate connect racing the one in flight.\n\nKeep the insertion where it is and add a fail_unlist: label, falling\ninto fail_ctrl:, for the error paths that run after it.  The earlier\nerror paths never reach the insertion and keep using fail_ctrl:\ndirectly, so the list is only touched where the controller is actually\non it.\n\nnvme_fc_ctrl_free() cannot use the plain \"goto free_ctrl\" the other\ntransports use, because it still has to put_device(), release the rport\nreference and free the ida entry for resources taken before the\ninsertion.  Sample list_empty() under rport->lock instead.\n\nctrl->ctrl.opts also stays valid for the whole teardown now.  That is\nnot the bug being fixed, but it removes some fragility around the old\nidiom: nvme_free_ctrl() calls nvme_auth_free() before ->free_ctrl(), and\nctrl_max_dhchaps() dereferences ctrl->opts without a NULL check when\nctrl->dhchap_ctxs is set, which nvme-fc permits since NVMF_ALLOWED_OPTS\nallows the dhchap options.  The nvme sysfs attributes that dereference\nctrl->opts, such as hostnqn and address, evaluate their is_visible()\ntest once at device_add() time and stay readable until\ncdev_device_del()."}],"metrics":[{"cvssV3_1":{"baseScore":7.5,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"scenarios":[{"lang":"en","value":"AV:A - 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.\nAC:H - 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.\nPR:N - 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.\nUI:N - 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.\nS:U - 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.\nC:H - 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.\nI:H - 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.\nA:H - 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."}]}],"providerMetadata":{"dateUpdated":"2026-09-16T14:40:56.569Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/8bd14aa065112b4d523bea690027c7527a6224f6"},{"url":"https://git.kernel.org/stable/c/7df913a7ced5d7349f0b23bdcf25ad54fe83a1c1"},{"url":"https://git.kernel.org/stable/c/5f89d68c00ccd1b25151da0bf660012380c2bad9"},{"url":"https://git.kernel.org/stable/c/56e6279266f6962bb2d38a54397e3c605165b0c5"}],"title":"nvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-89974","datePublished":"2026-09-16T10:32:53.124Z","dateReserved":"2026-09-11T19:38:34.779Z","dateUpdated":"2026-09-16T14:40:56.569Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-09-16 11:17:08","lastModifiedDate":"2026-09-16 15:18:21","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":7.5,"baseSeverity":"HIGH","attackVector":"ADJACENT_NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.6,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"89974","Ordinal":"1","Title":"nvme-fc: fix double free of fabrics options when nvme_add_ctrl()","CVE":"CVE-2026-89974","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"89974","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails\n\nnvmf_create_ctrl() owns the fabrics options and frees them whenever\n->create_ctrl() returns an error, so a transport must not free them on\nits own error paths.  nvme-fc tracks this by testing ctrl->ctrl.opts in\nnvme_fc_ctrl_free(), which requires nvme_fc_init_ctrl() to clear that\npointer on every error exit.\n\nThe coupling is implicit, and commit 1a9e218195a5 (\"nvme: split device\nadd from initialization\") broke it by adding a second error exit.  When\nnvme_add_ctrl() fails, nvme_fc_init_ctrl() jumps to out_put_ctrl:, past\nthe \"ctrl->ctrl.opts = NULL\" that only sits on the fail_ctrl: path, so\nnvme_fc_ctrl_free() frees the options and nvmf_create_ctrl() frees them\na second time:\n\n  BUG: KASAN: slab-use-after-free in nvmf_free_options+0x30/0x190\n   nvmf_free_options+0x30/0x190 drivers/nvme/host/fabrics.c:1284\n   nvmf_create_ctrl drivers/nvme/host/fabrics.c:1374 [inline]\n  Freed by task 5534:\n   nvme_fc_ctrl_free drivers/nvme/host/fc.c:2374 [inline]\n   nvme_fc_init_ctrl+0xe17/0x1450 drivers/nvme/host/fc.c:3605\n\nnvme_add_ctrl() fails when dev_set_name() cannot allocate, so this is\nreachable under memory pressure or fault injection.  Without KASAN the\noptions are freed twice.\n\nRather than clear the pointer on the second exit as well, derive\nownership the way nvme-tcp, nvme-rdma and nvme-loop do, from list\nmembership: their free_ctrl leaves the options alone unless the\ncontroller made it onto the transport list.\n\nThe list cannot simply be populated on the success path as it is there.\nnvme-fc runs the initial connect synchronously via flush_delayed_work(),\nand the controller has to be reachable on rport->ctrl_list for the whole\nof it: nvme_fc_unregister_remoteport() needs to find it to signal\nconnectivity loss, nvme_fc_match_disconn_ls() matches an incoming\nDisconnect Association LS against ctrl->association_id, which is only\nassigned during that window, nvme_fc_resume_controller() needs it on\nremoteport re-registration, and nvme_fc_existing_controller() uses it to\nreject a duplicate connect racing the one in flight.\n\nKeep the insertion where it is and add a fail_unlist: label, falling\ninto fail_ctrl:, for the error paths that run after it.  The earlier\nerror paths never reach the insertion and keep using fail_ctrl:\ndirectly, so the list is only touched where the controller is actually\non it.\n\nnvme_fc_ctrl_free() cannot use the plain \"goto free_ctrl\" the other\ntransports use, because it still has to put_device(), release the rport\nreference and free the ida entry for resources taken before the\ninsertion.  Sample list_empty() under rport->lock instead.\n\nctrl->ctrl.opts also stays valid for the whole teardown now.  That is\nnot the bug being fixed, but it removes some fragility around the old\nidiom: nvme_free_ctrl() calls nvme_auth_free() before ->free_ctrl(), and\nctrl_max_dhchaps() dereferences ctrl->opts without a NULL check when\nctrl->dhchap_ctxs is set, which nvme-fc permits since NVMF_ALLOWED_OPTS\nallows the dhchap options.  The nvme sysfs attributes that dereference\nctrl->opts, such as hostnqn and address, evaluate their is_visible()\ntest once at device_add() time and stay readable until\ncdev_device_del().","Type":"Description","Title":"nvme-fc: fix double free of fabrics options when nvme_add_ctrl()"}]}}}