CVE-2026-139787: nvme-tcp: fix use-after-free in nvme_tcp_free_ctrl()

Published Nov 30, 2026
·
Updated

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

nvme-tcp: fix use-after-free in nvmetcpfreectrl()

nvmetcpfreectrl() reads ctrl->ctrl.opts to know how many queue mutexes to destroy. When creating the controller fails, nvmfcreatectrl() frees opts as soon as nvmetcpcreatectrl() returns, but a concurrent open of the character device can hold the last reference to the controller. With CONFIGDEBUGKOBJECTRELEASE, which delays the release, every failed connect reads freed memory:

BUG: KASAN: slab-use-after-free in nvmetcpfreectrl+0x38b/0x430 Read of size 4 at addr ffff888005b93740 by task kworker/2:1/51

Keep the size of the queue array in the controller and use it instead.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In nvme-tcp, keep the queue-array size in the controller and use that stored size instead of reading ctrl->ctrl.opts after the options may have been freed.

Event History

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

Frequently Asked Questions

1

What runtime conditions are needed for this issue to occur?

Controller creation must fail, and a concurrent open of the character device must retain the controller's last reference after nvme_tcp_create_ctrl() returns. The subsequent controller release can then access options memory that was already freed.

2

Does CONFIG_DEBUG_KOBJECT_RELEASE affect exposure?

Yes. Because it delays object release, the report states that with CONFIG_DEBUG_KOBJECT_RELEASE enabled, every failed connect reads freed memory during controller cleanup.

3

How might an affected system be identified?

The reported symptom is a KASAN slab-use-after-free in nvme_tcp_free_ctrl(), caused by a read of freed memory during cleanup of a failed NVMe/TCP controller connection.

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