CVE-2026-139665: RDMA/core: Fix swapped list_add_tail() arguments in ib_add_sub_device()

Published Nov 30, 2026
·
Updated

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

RDMA/core: Fix swapped listaddtail() arguments in ibaddsubdevice()

ibaddsubdevice() links a new sub-device into its parent's sub-device list with:

listaddtail(&parent->subdevlisthead, &sub->subdevlist);

listaddtail(new, head) expects the node to insert as the first argument and the list head as the second, so the call above does the opposite of what was intended: it treats the parent's list head as the new node and the sub-device's node as the list head.

Because iballocdevice() initialises subdevlist to a self-referencing empty head, the misplaced insertion does not crash, but it corrupts the parent->subdevlisthead list. After adding two or more sub-devices, only the last one is reachable through the parent's head, and ibdelsubdeviceandput()'s listdel() on &sub->subdevlist rewrites the head pointers, potentially severing earlier sub-devices from the chain. During parent teardown, the reverse iteration over subdevlisthead then skips the orphaned sub-devices, so their delsubdev() callbacks are never invoked and ibdeviceput() on the parent is never paired, leaking both the HW sub-devices and a refcount.

Swap the arguments to match the documented intent: insert the sub-device node into the parent's list head.

Affected Software

1 affected component
Linux Linux kernel

Event History

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

Frequently Asked Questions

1

Which systems are exposed to the faulty cleanup behavior?

Systems that create two or more RDMA sub-devices under the same parent can be affected. With only one sub-device, the described orphaning behavior does not occur.

2

What happens when an affected parent device is torn down?

Earlier sub-devices can be skipped during reverse iteration because they are no longer reachable from the parent list. Their del_sub_dev() callbacks are not invoked, and the corresponding ib_device_put() operations on the parent are not performed, causing resource leaks.

3

How can operators recognize the issue in runtime behavior?

A parent with multiple sub-devices may expose only the most recently added sub-device through its sub-device list. Removing sub-devices can further sever earlier entries, and parent teardown may leave orphaned sub-devices without their cleanup callbacks being called.

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