From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796047084; b=eOaMt3wzQfKR32mjJ19EqrVJJ8s5ObUO6xfVjlML2/n2smUcnyARuEgkcHN99hCwtMAJ 5xKyD7wndVbtRCZMj6GN/eOa9f5nPUm0Vv6/74Qb5LLMYhwt+QF3fpMUWTNpcY9WBVIh/ bIHcxnu5RUs+RR05bHZSduefH1QRy7BoN7PqJJQHWfSv+MfK54xu3HJ/Ina+kc640DNnM rJW6s6GGRKMpCTe93zXibpNTPdCdN680ybgKf/q8FYVXSXHTSnKMlNqjTFU6v9rPvF09p dS93DucOxLCPIJENe63BfbiB4wwqSs/9JhzNtWleNQ9Eisf75L9YROVh3Q0IBo9JXAg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796047084; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=hQphJ1m4FjJIX2Gn8yOQcNKrQW20mEGbY86LVOs/eEg=; b=llVcmKQVZHoNSWSesqb6CjmjD0dmY7dPD90CvzsfbpSleohqpbN/miYl39S8om+nsuy0 i7sEgwp2C2c/iaWedH1ngnbkI9iAu1eovcYDz6D2Gyr0Jq19AzrK2CCUciiLzvX8+rE6I 1v8VbFo5/Oh71vpXL7JCxo+ejbZqyqdY5lQ5F9nzOG8iBlU/YW6nf774f67XB4/e2wYkv dfpMY2+2Rwwhk0/Y6KeDtuSDmXERZdnroLEH/Kq0fzw83m4dXv/pJxv9bnlM5/daajnR/ H5KYgcLreULkrpI53XS/ubRYI0/0sj1fZhvF2jUsUfZ0pU8UpzfPHLE+FbRE9Dh43kg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=cxB9hIDh; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A0720606A687 for ; Mon, 30 Nov 2026 13:58:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=cxB9hIDh Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2E2C1F00939; Mon, 30 Nov 2026 13:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796047084; bh=hQphJ1m4FjJIX2Gn8yOQcNKrQW20mEGbY86LVOs/eEg=; h=From:To:Cc:Subject:Date:Reply-To; b=cxB9hIDhuP3zQKNE1jxl0tWlrb5ZpMSKbmA882TC5E5p4EZpKB/xY8/w8ljdhvrG2 /Ltii4YYi3hCfHer+uFnx0H4jYSm+6DCuNjxzRPj2jOFhMUUG0j/voQ599j0nYzPmG KGqAkEb3VSknr5tpXsn4V99b8IM3xvDf/BsELwIA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-139161: tls: keep TX and RX hardware offload on the same device Date: Mon, 30 Nov 2026 14:32:50 +0100 Message-ID: <2026113044-CVE-2026-139161-e576@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4059; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=a5jXJYhJKIe29UaeFMZmlqmzG3Ah727u4mvi/s8ZOds=; b=owGbwMvMwCRo6H6F97bub03G02pJDNm8VQd+fhHIfDYlN/3gyv1u74unfjSoLPt4uvGSR83sY MbZgeuiOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi+0MZFrQ+LO04syi4eu9P Nqc7bFG7mfc45TLMU5rsbmv9PChdR3rJ+1vXD7I3tomyAwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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. The Linux kernel CVE team has assigned CVE-2026-139161 to this issue. Affected and fixed versions =========================== Issue introduced in 4.19 with commit 4799ac81e52a72a6404827bf2738337bb581a174 and fixed in 6.12.120 with commit a2b9316a40f20a79e460bf31c4f036c17cc9c512 Issue introduced in 4.19 with commit 4799ac81e52a72a6404827bf2738337bb581a174 and fixed in 6.18.66 with commit afd3039627d97a959214d544c660390cf28d6527 Issue introduced in 4.19 with commit 4799ac81e52a72a6404827bf2738337bb581a174 and fixed in 7.3.6 with commit d1a31f1523543513da5b285d82598977303011c7 Issue introduced in 4.19 with commit 4799ac81e52a72a6404827bf2738337bb581a174 and fixed in 7.4-rc1 with commit 1c8a70075235cd733095532a97f2405037c52a7b Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-139161 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: Documentation/networking/tls-offload.rst net/tls/tls_device.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/a2b9316a40f20a79e460bf31c4f036c17cc9c512 https://git.kernel.org/stable/c/afd3039627d97a959214d544c660390cf28d6527 https://git.kernel.org/stable/c/d1a31f1523543513da5b285d82598977303011c7 https://git.kernel.org/stable/c/1c8a70075235cd733095532a97f2405037c52a7b