AZL-117157: CVE-2026-139460 affecting package kernel 6.6.161.1-1

Published Nov 30, 2026
·
Updated

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

PCI/P2PDMA: Do not tear down the allocate attribute on registration failure

pcip2pdmaaddresource() installs pcip2pdmaunmapmappings() as a devres action with the devres allocated p2ppgmap as its data, and only then adds the range to the pool:

error = devmaddactionorreset(&pdev->dev, pcip2pdmaunmapmappings, p2ppgmap); if (error) goto pagesfree;

p2pdma = rcudereferenceprotected(pdev->p2pdma, 1); error = genpooladdowner(p2pdma->pool, ...); if (error) goto pagesfree;

The action removes the allocate attribute for the whole device, which tears down existing userspace mappings of every BAR already registered on it. Both failures here get that wrong, in opposite ways.

devmaddactionorreset() runs the action when it cannot allocate its devres node, so an -ENOMEM while registering a second BAR unmaps the first one. Use devmaddaction() and let the error path unwind only what this call created.

genpooladdowner() allocates a chunk and can also fail with -ENOMEM. There the action is registered, and the error path frees p2ppgmap with devmkfree() while leaving the action pointing at it. On unbind devres runs the action and pcip2pdmaunmapmappings() dereferences p2ppgmap->mem->owner->kobj, which is freed memory. Give that failure its own label and drop the action with devmremoveaction(), which removes it without running it.

Affected Software

1 affected component
azure-linux/kernel<=6.6.161.1-1

Event History

Nov 30, 2026
Advisory Published
via OSV·02:19 PM
Data Sourced
via OSV·02:19 PM
DescriptionAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Frequently Asked Questions

1

What conditions must be present for this issue to be triggered?

The issue occurs when registering PCI P2PDMA resources and either devres action allocation or gen_pool_add_owner() fails, including due to -ENOMEM. The described failure cases involve registration of a BAR, including registration of a second BAR when another BAR is already registered.

2

What is the practical impact of a failed registration?

An -ENOMEM while registering a second BAR can remove the allocate attribute and unmap existing userspace mappings for BARs already registered on the device. If gen_pool_add_owner() fails, a cleanup action can retain a pointer to freed memory and later be invoked during device unbind.

3

How can administrators recognize that they may be affected?

Look for failures while registering PCI P2PDMA BAR resources, particularly -ENOMEM errors from devres action setup or gen_pool_add_owner(). Systems with existing userspace mappings of previously registered BARs may observe those mappings being torn down after a later BAR registration failure.

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