CVE-2026-139011: ata: libata: Do not leave ata_host_stop() registered when activation fails

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

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

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

atahostactivate() and ahcihostactivatemultiirqs() can both fail after atahoststart() has succeeded, e.g. if devmrequestirq() or atahostregister() 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 ->hoststop().

All ahci-platform drivers are in that situation, e.g. ahciprobe() calls ahciplatformdisableresources() while ahcihoststop() 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 atahostundostart(), which stops the ports and drops the devres action without calling ->hoststop(), 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 ->hoststop() while also completely lacking error handling for the activate host call. Add activate host error handling for sataqstor and satafsl. For satafsl this also means that hcrbase and hostpriv are now released when activating the host fails, which ->hoststop() did not do when atahoststart() itself failed.

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

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:27 PM
Data Sourced
via MITRE·01:27 PM
Description

Frequently Asked Questions

1

Which systems are most likely to be affected?

The issue affects Linux systems using libata drivers whose probe error paths release host resources after ata_host_start() has succeeded but activation later fails. The description specifically identifies all ahci-platform drivers as being in this situation.

2

What conditions are needed to trigger the problem?

Driver initialization must fail after ata_host_start() succeeds, such as when devm_request_irq() or ata_host_register() fails in ata_host_activate() or ahci_host_activate_multi_irqs(). The driver must then perform its own host-resource cleanup in the probe error path while the devres ata_host_stop() action remains registered.

3

What are the operational consequences if it is triggered?

Resources can be released twice, producing reference-count underflow warnings from clock, regulator, and PHY cores. If the affected resources are shared, the double cleanup can disable resources that are still being used by other devices.

4

How does the fix prevent the double release?

The fix adds ata_host_undo_start(), which stops the ports and removes the devres action without calling the host stop callback. This lets the driver's probe error path clean up host resources without a later devres-triggered second release.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203