From mboxrd@z Thu Jan 1 00:00:00 1970 From: AL-KERNEL To: kernel-cve@kernelcve.org Subject: [CVE-2026-89974][MODERATE 7.0] nvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails Date: Wed, 16 Sep 2026 10:33:47 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AL-KERNEL-CVE: CVE-2026-89974 X-AL-KERNEL-Priority: MODERATE 7.0 X-AL-KERNEL-Severity: MODERATE 7.0 X-AL-KERNEL-Base-Severity: MODERATE X-AL-KERNEL-KPANIC: YES X-AL-KERNEL-ActionableScore: 6 X-AL-KERNEL-ActionableScore-Lower: 5 X-AL-KERNEL-Commit: 8bd14aa065112b4d523bea690027c7527a6224f6 List-Id: CVE: CVE-2026-89974 Priority: MODERATE 7.0 AL-KERNEL base severity: MODERATE KPANIC flag: YES Patch: nvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails Commit: 8bd14aa065112b4d523bea690027c7527a6224f6 Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8bd14aa065112b4d523bea690027c7527a6224f6 Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-89974 Analysis date: Wed, 16 Sep 2026 10:33:47 -0400 ActionableScore: 6 ActionableScore lower bound: 5 Actionable bucket: Actionable Moderate / Strong Important candidate requiring manual review Manual review required: YES Summary: A double free in the NVMe-FC host transport can occur when `nvme_add_ctrl()` fails after partial controller initialization, causing `nvmf_free_options()` to process the same fabrics options object twice and creating a real kernel heap UAF / double-free condition with at least local DoS impact and unresolved memory-corruption leverage. ====================================================================== ABOUT THIS REPORT ====================================================================== The original Linux kernel CVE announcement for CVE-2026-89974 is available here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-89974 The original announcement does not normally provide a security severity estimate, CVSS assessment, or enough information to determine whether the reported kernel bug represents a practically relevant security issue. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. It combines an autonomous classifier with LLM-assisted technical analysis and a separate ActionableScore mechanism. The purpose of this report is to prioritize Linux kernel CVEs before manual review, identify cases that require prompt investigation, and support automatic closure of issues that are unlikely to have meaningful security impact. Published priority for this report: MODERATE 7.0 Manual review required: YES A detailed explanation of the methodology and priority rules is included at the end of this message. ====================================================================== AL-KERNEL CLASSIFICATION RESULT ====================================================================== CVE-2026-89974 MODERATE https://www.kernelcve.org/list/?q=CVE-2026-89974 CHECK WITH IMPACT FROM ORIG NN LOW Maybe valid. Check manually. Hints by AL-KERNEL: The best (paranoid) CVSS is 'AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H';CWE-415;*CWE-416;CWE-703;Other CVSS 'AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:H';BEST CVSS score: '7';DESCR 'A double free in the NVMe/FC host transport can occur when nvme_add_ctrl() fails after the controller was partially initialized. nvmf_create_ctrl() still owns the fabrics options on create_ctrl() failure, but the nvme_fc error path could also free the same options through nvme_fc_ctrl_free(), producing a slab use after free in nvmf_free_options() and a real double free without KASAN. The direct trigger requires the nvme_add_ctrl() failure path, for example allocation failure in dev_set_name() under memory pressure or fault injection, so the base exploitability is local and high complexity. For the CVSS the PR:L is used in the paranoid vector because a local unprivileged user may be able to combine memory pressure with an administrative or automated NVMe FC connect or recovery path, while direct controller creation usually requires higher privileges. Impact is at least local denial of service via kernel crash and in worst case may allow confidentiality, integrity, and availability impact due to kernel heap memory corruption.';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Actionable Moderate / Strong Important candidate requiring manual review (with actual score 6) YES LOCK DANGER INIT NVME ERRORPATH UAF HARDWARE LINUS TEST SYZBOT KPANIC INCREASED_TO_MODERATE7_FROM_LOW_BASED_ON_GUESSCVSS_AND_ACTIONABLESCOREHIGHER4 KPANIC INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHERTHAN5 DECREASED_TO_MODERATE7_BASED_ON_FALSEPOSCHECKOFDH YES NO checked ====================================================================== ACTIONABLESCORE ANALYSIS ====================================================================== ActionableScore=6 ActionableScoreLower=5 PrimitiveClass=CLASS_B RealUAF=YES HostAdminRequired=UNKNOWN NamespaceScopedPrivilege=NO ImportantCandidate=YES ManualReview=REQUIRED AutoDowngradeAllowed=NO ## 1. ActionableScore * Raw conservative score: 4 * Conservative score: 5 * Applied conservative floor/cap: Real UAF FLOOR 5 applied because this is a concrete double-free / repeated lifetime operation on the same fabrics options object. * Raw paranoid score: 6 * Paranoid score: 6 * Applied paranoid floor/cap: none * Final recommended bucket: **Actionable Moderate / Strong Important candidate requiring manual review**:: ## 2. Signal breakdown Conservative signals: * +2 Real UAF / lifetime violation. The patch establishes that `nvme_fc_ctrl_free()` can free `ctrl->ctrl.opts`, and then `nvmf_create_ctrl()` frees the same fabrics options again after `create_ctrl()` returns an error. * +1 Concrete repeated release/free operation. The first `nvmf_free_options()` can end the lifetime of the options object, the same logical options reference remains owned by `nvmf_create_ctrl()`, and a second `nvmf_free_options()` is then reached on the same object. * +1 Reliable kernel crash / strong DoS. KASAN reports slab-use-after-free in `nvmf_free_options()`, and the commit states that without KASAN the options are freed twice. * Raw conservative score: 2 + 1 + 1 = 4. * FLOOR 5 applied. The first free can end object lifetime, the exact same options object is later freed again, and the second operation is a concrete lifetime mutation rather than only a stale read. Paranoid additional signals: * +1 Paranoid repeated-free leverage. The second free path operates through storage whose original object lifetime may already have ended, which leaves unresolved post-free heap corruption leverage even though controlled reclaim is not demonstrated. * +1 Active structured object teardown concern. The supplied context notes that `ctrl->ctrl.opts` is also used during teardown by auth/sysfs-related paths such as `nvme_auth_free()`, `ctrl_max_dhchaps()`, and attributes like `hostnqn` and `address`. This supports additional manual-review concern for stale structured options state, but not Class A. * Raw paranoid score: 2 + 1 + 1 + 1 + 1 = 6. Important non-awarded signals: * Controlled reclaim not demonstrated. * Arbitrary kernel read/write not demonstrated. * Callback or function-pointer control not demonstrated. * Confidentiality and integrity bonuses not awarded directly. The double-free is a real heap lifetime corruption primitive, but no concrete disclosure or unauthorized write primitive is established. * Remote reachability not established. NVMe-FC controller creation is a local/control-plane storage operation, not direct packet-triggered network input. * Local unprivileged trigger not awarded because complete below-host-admin reachability is not proven. * Host-admin penalty not applied because host-admin-equivalent privilege is not positively established by the supplied evidence. * Extra availability point not awarded because the same crash/double-free consequence is already counted once. * Weak LPE not separately awarded for the same repeated-free fact. * Class A not assigned because there is no demonstrated controlled reclaim, refcount takeover, arbitrary write, or proven privilege escalation. Concrete repeated-release/refcount checklist: * First release can end lifetime: yes. `nvmf_free_options()` frees the fabrics options object. * Exact same reference survives: yes. Ownership remains with `nvmf_create_ctrl()` when `create_ctrl()` fails. * Second operation is a real lifetime mutation: yes. `nvmf_create_ctrl()` calls `nvmf_free_options()` again. * +1 Concrete repeated release/free awarded: yes. * Paranoid repeated-refcount/free leverage +1 awarded: yes, because the second operation itself processes already-freed storage. * FLOOR 5 applied: yes. ## 3. Reachability analysis The reachable failure sequence is local/control-plane oriented. A controller is partially initialized in `nvme_fc_init_ctrl()`, `nvme_add_ctrl()` fails, and the error path reaches controller teardown where ownership of fabrics options is mishandled. The commit states that `nvme_add_ctrl()` can fail when `dev_set_name()` cannot allocate, so the trigger is reachable under memory pressure or fault injection. Fault injection is normally privileged, while memory pressure may be influenced by local workloads, but the complete attacker-controlled path to NVMe-FC controller creation is not proven in the supplied material. HostAdminRequired is therefore UNKNOWN rather than YES. Direct NVMe-FC controller creation commonly involves privileged storage configuration, but the prompt requires positive evidence before setting host-admin-equivalent privilege. NamespaceScopedPrivilege is NO because this is an NVMe-FC host/storage controller path, not a namespace-scoped network capability path. No direct remote reachability is established. NVMe-FC depends on Fibre Channel / fabrics storage configuration and local host control-plane operations. The bug is not triggered merely by receiving arbitrary network packets. There is no race requirement. This is an ordered error-path ownership bug, not a timing window. ## 4. Primitive and severity interpretation The exact primitive is a double free of `struct nvmf_ctrl_options` / fabrics options, observed as slab-use-after-free in `nvmf_free_options()` under KASAN. This is a real kernel heap lifetime violation. The stale object is an active structured options object, not a fixed stale DMA buffer. The demonstrated core bug is not merely an ordinary cleanup stale dereference. It is category B from the repeated-lifetime distinction: A. Ordinary stale cleanup dereference: not the best classification, because the bug is not only a stale read or immediate fault. B. Second lifetime/free mutation through a potentially dangling object: yes. `nvme_fc_ctrl_free()` can free options, then `nvmf_create_ctrl()` frees them again. PrimitiveClass is CLASS_B. It is not CLASS_A because the patch does not establish controlled reclaim, arbitrary write, callback control, refcount takeover, or a demonstrated LPE chain. The demonstrated consequence is kernel heap use-after-free / double-free and likely kernel crash. The speculative consequence is stronger heap corruption impact, including possible privilege escalation, but that is not proven. Because the bug is a concrete double-free with unresolved post-lifetime corruption leverage, ImportantCandidate is YES and AutoDowngradeAllowed is NO. Likely operational severity is Actionable Moderate at minimum, with Strong Important candidacy requiring manual review. ## 5. One-sentence report phrase A double free in the NVMe-FC host transport can occur when `nvme_add_ctrl()` fails after partial controller initialization, causing `nvmf_free_options()` to process the same fabrics options object twice and creating a real kernel heap UAF / double-free condition with at least local DoS impact and unresolved memory-corruption leverage. ## 6. Manual review recommendation MANUAL CHECK REQUIRED Reason: this is a concrete double-free / UAF with a second lifetime-mutating operation on the same options object, and the unresolved heap-corruption implications should not be automatically downgraded to ordinary Moderate. ## 7. Call-site confidence Call-site confidence: high ====================================================================== UPSTREAM PATCH SUMMARY ====================================================================== Patch: nvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails Commit: 8bd14aa065112b4d523bea690027c7527a6224f6 Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8bd14aa065112b4d523bea690027c7527a6224f6 Commit description: 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 1a9e218 ("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(). Fixes: 1a9e218 ("nvme: split device add from initialization") Cc: stable@vger.kernel.org Reported-by: syzbot+f58e57380a6083c4041d@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=f58e57380a6083c4041d Signed-off-by: Niklas Cassel Tested-by: Rihyeon Kim Reviewed-by: Hannes Reinecke Signed-off-by: Keith Busch Signed-off-by: Greg Kroah-Hartman Changed files: drivers/nvme/host/fabrics.c drivers/nvme/host/fc.c Diff excerpt: Not included in this email. See the upstream URL for the full patch. Full patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8bd14aa065112b4d523bea690027c7527a6224f6 ====================================================================== DETAILED REPORT METHODOLOGY ====================================================================== The original Linux kernel CVE announcement for CVE-2026-89974 can be found here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-89974 The original CVE announcement normally does not include a security-level estimate. In particular, it may not contain a CVSS assessment, an impact level, or enough information to determine whether the reported bug is a practically relevant security issue. One purpose of this parallel CVE list is to provide that missing technical and prioritization information. The original goal of the AL-KERNEL project was to prioritize Linux kernel CVE analysis automatically before manual review. The system can also help identify non-security issues that may be suitable for automatic closure. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. The first analysis stage combines an autonomous classifier with additional LLM-based analysis. The autonomous classifier runs locally on a CPU and is based on a backpropagation neural network. Together, these mechanisms produce a technical vulnerability description, identify likely weakness types, estimate CVSS severity, and provide input for ActionableScore. Two CVSS estimates are retained because incomplete kernel vulnerability information often permits more than one defensible interpretation: Conservative CVSS vector: AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:H The Best / paranoid CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H The Best / paranoid CVSS score: 7 The conservative vector represents a lower-impact interpretation. The Best/paranoid vector intentionally represents a plausible upper-bound interpretation and should not automatically be treated as demonstrated real-world impact. CVSS may also need to be adjusted for a particular Linux deployment, because actual reachability, privileges, enabled kernel configuration, hardware, namespaces, exposed device nodes, and other environmental conditions can differ significantly between systems. A separate ActionableScore mechanism evaluates practical remediation urgency. Its analysis may include reachability, attack prerequisites, subsystem exposure, memory-corruption characteristics, denial-of-service reliability, and possible confidentiality, integrity, or privilege-escalation impact. Conservative ActionableScore: 5 Paranoid ActionableScore: 6 The final base severity is taken directly from the second tab-separated field of the AL-KERNEL classification result. ActionableScore does not replace or independently override that final AL-KERNEL decision, and if ActionableScore adjusted impact level of ALKERNEL, then you would see self-readable flags above like INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7. For an AL-KERNEL result of MODERATE, this report uses the following additional presentation split: ActionableScore below 5 -> MODERATE REGULAR ActionableScore 5 or more -> MODERATE 7.0 The distinction between MODERATE REGULAR and MODERATE 7.0 makes it possible to identify Moderate issues that should receive manual analysis and fixes before lower-priority MODERATE REGULAR issues. In many cases, MODERATE REGULAR fixes may wait for a later rebase or routine update. There is one override in which MODERATE REGULAR becomes MODERATE 7.0 even when the ActionableScore is below 5. When the AL-KERNEL result contains the KPANIC flag, a MODERATE result is always presented as MODERATE 7.0. The KPANIC flag selected with few regexps without usage of AI at all, so it helps to detect cases when Kernel Crash happens and similar (to filter False-Negative results from the LLM usage). KPANIC indicates that a reliable kernel crash, kernel panic, or similarly serious kernel availability impact was identified by the classification workflow. AL-KERNEL base severity for this report: MODERATE KPANIC detected for this report: YES Published priority for this report (same as in Subject): MODERATE 7.0 These results are intended to support engineering triage. They are machine-generated estimates, and cases marked for manual review should be validated by a human security engineer before final disposition. For more info read docs linked from here: https://kernelcve.org/ (and you can submit you own patch there to generate such a report for non-existant CVE-id yet). Note that in many cases this AI tool selects higher severity, than real is (means you can expect Importants instead of Moderate 7.0 or Moderates 7.0 instead of regular Moderates). If you see such cases, please use reply email interface to add additional manual analyses info to this particular CVE. And please, please, let me know when you see Lows instead of Importants or Important instead of Low (because particular for such cases I need to tune this AI tool to make it better for this one and next similar). My contact email for such notifications is alexanjelausa@gmail.com (and both send reply to CVE record itself too and see "reply" button below for howto reply).