CVE-2026-139011

ata: libata: Do not leave ata_host_stop() registered when activation fails

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ata: libata: Do not leave ata_host_stop() registered when activation fails

ata_host_start() registers ata_host_stop() as a devres action as soon as
it has succeeded, which hands the release of the host resources over to
devres: ->port_stop() and ->host_stop() are then called by the driver
core when probe() fails.

ata_host_activate() and ahci_host_activate_multi_irqs() can both fail
after ata_host_start() has succeeded, e.g. if devm_request_irq() or
ata_host_register() fails, and they return the error with the devres
action still registered. A driver which releases the host resources in
its probe() error path therefore releases them twice: once itself and
once through ->host_stop().

All ahci-platform drivers are in that situation, e.g. ahci_probe() calls
ahci_platform_disable_resources() while ahci_host_stop() does the same
through devres. This gives refcount underflow warnings from the clk,
regulator and phy cores and, for shared resources, can disable resources
which are still in use by other devices.

Add ata_host_undo_start(), which stops the ports and drops the devres
action without calling ->host_stop(), and call it from both activation
helpers when they fail. Releasing the host resources on failure is then
always left to the caller, which is what all callers having a probe()
error path already assume.

This changes the semantics for the drivers which implement ->host_stop()
while also completely lacking error handling for the activate host call.
Add activate host error handling for sata_qstor and sata_fsl. For
sata_fsl this also means that hcr_base and host_priv are now released
when activating the host fails, which ->host_stop() did not do when
ata_host_start() itself failed.

Note that ata_pci_sff_activate_host() is deliberately left as is: none of
its callers releases the host resources in its probe() error path, they
all rely on ->host_stop() being called by devres, including
ata_pci_init_one(), which releases the devres group of the host itself.

Analysis

AI-generated

Technical impact

The linux kernel’s ATA host activation logic registers a cleanup action that, when activation fails, remains registered. During probe failure the kernel’s devres infrastructure then calls the cleanup action twice, causing reference count underflows in the clock, regulator, and phy subsystems. This double‑release releases shared resources that may still be in use by other devices, leading to kernel warnings, stale resource state, and potentially causing device or system instability. The result is a local denial of service scenario triggered by a failed host activation.

Affected Systems

This flaw affects all Linux kernel releases that include the libata subsystem and the AHCI and SATA drivers, specifically kernels executing the ata_host_start/activate sequence. The bug was present in all kernel versions prior to the fix that is now in the mainline tree. All vendors shipping the Linux kernel—whether on bare metal, virtual machines, or embedded platforms—may be impacted until they apply the upstream patch or a vendor‑specific update that incorporates it.

Risk and Exploitability

The potential impact is high because the double release can destabilize critical kernel resources, leading to a denial of service. The estimated likelihood of exploitation is limited to environments where an attacker can trigger ATA host activation failures, such as by running unauthorized drivers or manipulating ATA devices. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog, and no EPSS score is available; therefore the exact attack probability is uncertain, but the severity of the failure makes it a concern for systems that rely heavily on SATA or AHCI storage devices.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a revision that includes the ata_host_undo_start patch and other upstream changes.
  • Verify that all ATA‑related drivers (ahci, sata_fsl, ahci_platform) are updated to the patched versions in the new kernel.
  • If an immediate kernel upgrade is not feasible, disable or suspend ATA devices that could trigger activation failures until the kernel is patched, to prevent the double‑release scenario.

Generated by OpenCVE AI on November 30, 2026 at 18:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-415
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ata: libata: Do not leave ata_host_stop() registered when activation fails ata_host_start() registers ata_host_stop() as a devres action as soon as it has succeeded, which hands the release of the host resources over to devres: ->port_stop() and ->host_stop() are then called by the driver core when probe() fails. ata_host_activate() and ahci_host_activate_multi_irqs() can both fail after ata_host_start() has succeeded, e.g. if devm_request_irq() or ata_host_register() fails, and they return the error with the devres action still registered. A driver which releases the host resources in its probe() error path therefore releases them twice: once itself and once through ->host_stop(). All ahci-platform drivers are in that situation, e.g. ahci_probe() calls ahci_platform_disable_resources() while ahci_host_stop() does the same through devres. This gives refcount underflow warnings from the clk, regulator and phy cores and, for shared resources, can disable resources which are still in use by other devices. Add ata_host_undo_start(), which stops the ports and drops the devres action without calling ->host_stop(), and call it from both activation helpers when they fail. Releasing the host resources on failure is then always left to the caller, which is what all callers having a probe() error path already assume. This changes the semantics for the drivers which implement ->host_stop() while also completely lacking error handling for the activate host call. Add activate host error handling for sata_qstor and sata_fsl. For sata_fsl this also means that hcr_base and host_priv are now released when activating the host fails, which ->host_stop() did not do when ata_host_start() itself failed. Note that ata_pci_sff_activate_host() is deliberately left as is: none of its callers releases the host resources in its probe() error path, they all rely on ->host_stop() being called by devres, including ata_pci_init_one(), which releases the devres group of the host itself.
Title ata: libata: Do not leave ata_host_stop() registered when activation fails
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:27 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM