AZL-116926: CVE-2026-139161 affecting package kernel 6.6.161.1-1
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. tlsdeviceattach() sees the existing TLS destructor and keeps ctx->netdev pointing at A. The RX driver state on B is then untracked: tlsdevresync() and tlsdevdel() are invoked on A for a context it never created, and neither socket close nor NETDEVDOWN on B calls tlsdevdel() for B, so the driver context leaks. The reverse setup order has the same problem.
Check the shared device binding under deviceoffloadlock before each tlsdevadd(). Permit the first attachment and a second direction on the same device. Reject a different device, including when the old binding was cleared by NETDEVDOWN: the TLS destructor remains installed and tlsdeviceattach() 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Keep TX and RX TLS hardware offload on the same device. If the requested direction uses a different device from the existing binding, reject that hardware attachment and fall back to software for that direction.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using Linux kernel TLS hardware offload are exposed when TX and RX offload can be set up on different network devices. This can occur after a route change or when the usable-slave set changes for an 802.3ad or balance-xor bond using layer3+4 hashing.
What is the practical impact if the condition occurs?
The RX driver state on the second device can become untracked. Cleanup operations are sent to the original device instead, so the second device's driver context can leak and is not removed when the socket closes or that device goes down.
Does the issue require a specific setup sequence?
No. The described failure can occur when TX is offloaded first and RX is later configured on another device, and the reverse setup order has the same problem.
What happens after the resolved behavior detects that the other TLS direction would use a different device?
The requested direction falls back to software TLS rather than creating hardware offload state on a different device. The first attachment and the opposite direction on the same device remain permitted.