{"id":"CVE-2026-139011","state":"PUBLISHED","title":"ata: libata: Do not leave ata_host_stop() registered when activation fails","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nata: libata: Do not leave ata_host_stop() registered when activation fails\n\nata_host_start() registers ata_host_stop() as a devres action as soon as\nit has succeeded, which hands the release of the host resources over to\ndevres: ->port_stop() and ->host_stop() are then called by the driver\ncore when probe() fails.\n\nata_host_activate() and ahci_host_activate_multi_irqs() can both fail\nafter ata_host_start() has succeeded, e.g. if devm_request_irq() or\nata_host_register() fails, and they return the error with the devres\naction still registered. A driver which releases the host resources in\nits probe() error path therefore releases them twice: once itself and\nonce through ->host_stop().\n\nAll ahci-platform drivers are in that situation, e.g. ahci_probe() calls\nahci_platform_disable_resources() while ahci_host_stop() does the same\nthrough devres. This gives refcount underflow warnings from the clk,\nregulator and phy cores and, for shared resources, can disable resources\nwhich are still in use by other devices.\n\nAdd ata_host_undo_start(), which stops the ports and drops the devres\naction without calling ->host_stop(), and call it from both activation\nhelpers when they fail. Releasing the host resources on failure is then\nalways left to the caller, which is what all callers having a probe()\nerror path already assume.\n\nThis changes the semantics for the drivers which implement ->host_stop()\nwhile also completely lacking error handling for the activate host call.\nAdd activate host error handling for sata_qstor and sata_fsl. For\nsata_fsl this also means that hcr_base and host_priv are now released\nwhen activating the host fails, which ->host_stop() did not do when\nata_host_start() itself failed.\n\nNote that ata_pci_sff_activate_host() is deliberately left as is: none of\nits callers releases the host resources in its probe() error path, they\nall rely on ->host_stop() being called by devres, including\nata_pci_init_one(), which releases the devres group of the host itself.","publishedAt":"2026-11-30T13:27:02.826Z","updatedAt":"2026-11-30T13:27:02.826Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"6359fca8fdf9265e82cf740d4972ddd7dc775ee5","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"1f1f2ce4ea2b81955e6be8a36b161838c68643ef","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"9fd76c2410e86e8fe356a7c4a659cc8d09459587","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"62bc5f7c76b399b77ee2d94e6e20e044e76aef47","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"a53a677c1ddc38d8773587eb3897f44700dde03b","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"1b2d819c09f0bea5cff5c53ff7dcb4df47da6efd","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"1a27d5b8124ad852857d4080fa9271084f1d503e","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"d2f977008cbbae195df678ee1e70e5802f9bd0b8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ata/libahci.c","drivers/ata/libahci_platform.c","drivers/ata/libata-core.c","drivers/ata/libata-sff.c","drivers/ata/sata_fsl.c","drivers/ata/sata_qstor.c","include/linux/libata.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.8","versionType":"semver"},{"version":"5.10.275","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.63","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.4","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ata/libahci.c","drivers/ata/libahci_platform.c","drivers/ata/libata-core.c","drivers/ata/libata-sff.c","drivers/ata/sata_fsl.c","drivers/ata/sata_qstor.c","include/linux/libata.h"]}],"references":["https://git.kernel.org/stable/c/6359fca8fdf9265e82cf740d4972ddd7dc775ee5","https://git.kernel.org/stable/c/1f1f2ce4ea2b81955e6be8a36b161838c68643ef","https://git.kernel.org/stable/c/9fd76c2410e86e8fe356a7c4a659cc8d09459587","https://git.kernel.org/stable/c/62bc5f7c76b399b77ee2d94e6e20e044e76aef47","https://git.kernel.org/stable/c/a53a677c1ddc38d8773587eb3897f44700dde03b","https://git.kernel.org/stable/c/1b2d819c09f0bea5cff5c53ff7dcb4df47da6efd","https://git.kernel.org/stable/c/1a27d5b8124ad852857d4080fa9271084f1d503e","https://git.kernel.org/stable/c/d2f977008cbbae195df678ee1e70e5802f9bd0b8"],"weaknesses":[],"ingestedAt":"2026-11-30T13:40:04.421Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139011.json","commit":"5317bbbde1916a58cb1fadabb726eb126daf44c1","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139011","state":"PUBLISHED","datePublished":"2026-11-30T13:27:02.826Z","dateUpdated":"2026-11-30T13:27:02.826Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.908Z"},"containers":{"cna":{"title":"ata: libata: Do not leave ata_host_stop() registered when activation fails","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nata: libata: Do not leave ata_host_stop() registered when activation fails\n\nata_host_start() registers ata_host_stop() as a devres action as soon as\nit has succeeded, which hands the release of the host resources over to\ndevres: ->port_stop() and ->host_stop() are then called by the driver\ncore when probe() fails.\n\nata_host_activate() and ahci_host_activate_multi_irqs() can both fail\nafter ata_host_start() has succeeded, e.g. if devm_request_irq() or\nata_host_register() fails, and they return the error with the devres\naction still registered. A driver which releases the host resources in\nits probe() error path therefore releases them twice: once itself and\nonce through ->host_stop().\n\nAll ahci-platform drivers are in that situation, e.g. ahci_probe() calls\nahci_platform_disable_resources() while ahci_host_stop() does the same\nthrough devres. This gives refcount underflow warnings from the clk,\nregulator and phy cores and, for shared resources, can disable resources\nwhich are still in use by other devices.\n\nAdd ata_host_undo_start(), which stops the ports and drops the devres\naction without calling ->host_stop(), and call it from both activation\nhelpers when they fail. Releasing the host resources on failure is then\nalways left to the caller, which is what all callers having a probe()\nerror path already assume.\n\nThis changes the semantics for the drivers which implement ->host_stop()\nwhile also completely lacking error handling for the activate host call.\nAdd activate host error handling for sata_qstor and sata_fsl. For\nsata_fsl this also means that hcr_base and host_priv are now released\nwhen activating the host fails, which ->host_stop() did not do when\nata_host_start() itself failed.\n\nNote that ata_pci_sff_activate_host() is deliberately left as is: none of\nits callers releases the host resources in its probe() error path, they\nall rely on ->host_stop() being called by devres, including\nata_pci_init_one(), which releases the devres group of the host itself."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"6359fca8fdf9265e82cf740d4972ddd7dc775ee5","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"1f1f2ce4ea2b81955e6be8a36b161838c68643ef","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"9fd76c2410e86e8fe356a7c4a659cc8d09459587","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"62bc5f7c76b399b77ee2d94e6e20e044e76aef47","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"a53a677c1ddc38d8773587eb3897f44700dde03b","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"1b2d819c09f0bea5cff5c53ff7dcb4df47da6efd","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"1a27d5b8124ad852857d4080fa9271084f1d503e","versionType":"git"},{"version":"1896b15eddb4ff7266bccf3efa981885ecf80ab1","status":"affected","lessThan":"d2f977008cbbae195df678ee1e70e5802f9bd0b8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ata/libahci.c","drivers/ata/libahci_platform.c","drivers/ata/libata-core.c","drivers/ata/libata-sff.c","drivers/ata/sata_fsl.c","drivers/ata/sata_qstor.c","include/linux/libata.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.8","versionType":"semver"},{"version":"5.10.275","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.63","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.4","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ata/libahci.c","drivers/ata/libahci_platform.c","drivers/ata/libata-core.c","drivers/ata/libata-sff.c","drivers/ata/sata_fsl.c","drivers/ata/sata_qstor.c","include/linux/libata.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/6359fca8fdf9265e82cf740d4972ddd7dc775ee5"},{"url":"https://git.kernel.org/stable/c/1f1f2ce4ea2b81955e6be8a36b161838c68643ef"},{"url":"https://git.kernel.org/stable/c/9fd76c2410e86e8fe356a7c4a659cc8d09459587"},{"url":"https://git.kernel.org/stable/c/62bc5f7c76b399b77ee2d94e6e20e044e76aef47"},{"url":"https://git.kernel.org/stable/c/a53a677c1ddc38d8773587eb3897f44700dde03b"},{"url":"https://git.kernel.org/stable/c/1b2d819c09f0bea5cff5c53ff7dcb4df47da6efd"},{"url":"https://git.kernel.org/stable/c/1a27d5b8124ad852857d4080fa9271084f1d503e"},{"url":"https://git.kernel.org/stable/c/d2f977008cbbae195df678ee1e70e5802f9bd0b8"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:27:02.826Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"5.10.275"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"6.18.63"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}