CVE-2026-139161

tls: keep TX and RX hardware offload on the same device

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

tls: keep TX and RX hardware offload on the same device

After TX is offloaded on device A, a route change, or a change in the
usable-slave set of an 802.3ad or balance-xor (layer3+4) bond, can make
RX setup program device B. tls_device_attach() sees the existing TLS
destructor and keeps ctx->netdev pointing at A. The RX driver state on B
is then untracked: tls_dev_resync() and tls_dev_del() are invoked on A
for a context it never created, and neither socket close nor
NETDEV_DOWN on B calls tls_dev_del() for B, so the driver context leaks.
The reverse setup order has the same problem.

Check the shared device binding under device_offload_lock before each
tls_dev_add(). Permit the first attachment and a second direction on the
same device. Reject a different device, including when the old binding
was cleared by NETDEV_DOWN: the TLS destructor remains installed and
tls_device_attach() cannot establish a new binding. Setup then falls
back to software for the requested direction.

The RX check precedes allocation and software setup. TX uses its existing
resource unwind path without calling the driver. Document the shared
binding and clarify that fallback is per direction.

This issue was discovered during code review and subsequently
reproduced on hardware using mlx5 and TLS 1.2 AES-GCM-128.

Changing the route between TX and RX setup installed the second
direction on a different device. Driver traces showed successful adds
on both devices, but both deletes at socket close targeted the first
device, leaving an orphaned context on the second. Both setup orders
reproduced the leak, even though all current core TLS context counters
returned to zero. No crash was observed.

With the fix, the same tests correctly fall back to software for the
second direction and leave no orphaned hardware context.

Analysis

AI-generated

Technical impact

The Linux kernel TLS offload subsystem may incorrectly keep a reference to a network device after a route change or bond reconfiguration, leaving an orphaned TLS offload context on a device that was never created. This resource leak consumes hardware offload slots but does not cause a kernel crash. The description does not mention any direct exploitation or crash scenarios.

Affected Systems

Affected systems include any Linux systems running a kernel that implements hardware TLS offload via the mlx5 driver or similar. The issue is vendor‐agnostic, affecting the upstream Linux kernel as shipped by Linux:Linux. No specific kernel version is stated in the advisory; however, any kernel build that has not incorporated the referenced commit lines (e.g., from the provided git references) is vulnerable.

Risk and Exploitability

The vulnerability does not result in an obvious denial of service or crash, but it can leave orphaned TLS offload contexts. Based on the description, an attacker would need the ability to modify routing or bonding configuration to trigger the bug, which typically requires privileged access. The EPSS score is not available and no CVSS score is provided. The vulnerability is not listed in CISA KEV, and there is no evidence of a public exploit.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that contains the TLS offload context binding fix referenced in the git commits.
  • Disable TLS offloading on network interfaces that are part of bonding or may experience routing changes, or reconfigure bonds so that transmit and receive use the same device.
  • Monitor system logs for TLS offload context creation and deletion notices, and perform routine tests involving bond or routing changes to detect orphaned contexts early.

Generated by OpenCVE AI on December 1, 2026 at 10:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-790
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: tls: keep TX and RX hardware offload on the same device After TX is offloaded on device A, a route change, or a change in the usable-slave set of an 802.3ad or balance-xor (layer3+4) bond, can make RX setup program device B. tls_device_attach() sees the existing TLS destructor and keeps ctx->netdev pointing at A. The RX driver state on B is then untracked: tls_dev_resync() and tls_dev_del() are invoked on A for a context it never created, and neither socket close nor NETDEV_DOWN on B calls tls_dev_del() for B, so the driver context leaks. The reverse setup order has the same problem. Check the shared device binding under device_offload_lock before each tls_dev_add(). Permit the first attachment and a second direction on the same device. Reject a different device, including when the old binding was cleared by NETDEV_DOWN: the TLS destructor remains installed and tls_device_attach() cannot establish a new binding. Setup then falls back to software for the requested direction. The RX check precedes allocation and software setup. TX uses its existing resource unwind path without calling the driver. Document the shared binding and clarify that fallback is per direction. This issue was discovered during code review and subsequently reproduced on hardware using mlx5 and TLS 1.2 AES-GCM-128. Changing the route between TX and RX setup installed the second direction on a different device. Driver traces showed successful adds on both devices, but both deletes at socket close targeted the first device, leaving an orphaned context on the second. Both setup orders reproduced the leak, even though all current core TLS context counters returned to zero. No crash was observed. With the fix, the same tests correctly fall back to software for the second direction and leave no orphaned hardware context.
Title tls: keep TX and RX hardware offload on the same device
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-790

    Improper Filtering of Special Elements

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:32 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM