Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C671B2FC038 for ; Fri, 22 Aug 2025 13:01:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755867682; cv=none; b=BX2OWTI7qyjmwTgBQA0HNzb24jTOCwwsNnTy7Aj9VMOpxqC+0hzWJhb3bzZa54JiJuBf6yMBDNbg+xynvRA+99VUXF1FF8f/BR9kIna0uIId2/p/jJKz9JCKSfq9a+pXj9Sxd8l1m/I4eaoKVf2BAA1hm/TurZFuQLyKpFFSQGw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755867682; c=relaxed/simple; bh=RKDErLhwq2vSu1tXnjrDCSKFothyKw1xHHSCyOXmMLY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BnaaOhiq4ge2C88w/OFy3Fi8mPkP1J9GAneIVH0QYnorFSXoIEmnjT2+iVtvEgfOhsOulH/qS6k7FfLz33U/VT0c7jxQHNCw7xKYEEFb6/kC1sMP/9BIL33bzySRwQvortSdoIM1QZgTVWOu1/DILfo9Xh4As9oBKkzstgbiFls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mJ8V/3la; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mJ8V/3la" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AF02C4CEED; Fri, 22 Aug 2025 13:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755867682; bh=RKDErLhwq2vSu1tXnjrDCSKFothyKw1xHHSCyOXmMLY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mJ8V/3laQTiam6fhYvqVXlmwhQwnRuf0eanSWh3W6yxlKSY3c+RTvCLG67GlPGM+e ReUuf0LArEBzBFF/3xyrge4QlaRANSUXQU47FxrtgDX+xDt07AZrUlEXPVrvSNoGha C6fBEJX+YQcrNkKWnUUpne79JBZPUBdWlepQEoxM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38616: tls: handle data disappearing from under the TLS ULP Date: Fri, 22 Aug 2025 15:01:12 +0200 Message-ID: <2025082212-CVE-2025-38616-64a8@gregkh> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3159; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=G9CjqWq6kI/jK1jOqdov9TvseV6y96IQpqZMYJtCsc8=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkrsiQ/Llhwiv2WTulFiZa9WkuPcT3JaTHRnfN5jV2r4 s2ym6orO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAipRUMczhEJzsUPnUU9Vja eD/iJ59ktKeiCsN8X2dGp4+R69PvL3y3MunnM8NPT3NfAQA= 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: handle data disappearing from under the TLS ULP TLS expects that it owns the receive queue of the TCP socket. This cannot be guaranteed in case the reader of the TCP socket entered before the TLS ULP was installed, or uses some non-standard read API (eg. zerocopy ones). Replace the WARN_ON() and a buggy early exit (which leaves anchor pointing to a freed skb) with real error handling. Wipe the parsing state and tell the reader to retry. We already reload the anchor every time we (re)acquire the socket lock, so the only condition we need to avoid is an out of bounds read (not having enough bytes in the socket for previously parsed record len). If some data was read from under TLS but there's enough in the queue we'll reload and decrypt what is most likely not a valid TLS record. Leading to some undefined behavior from TLS perspective (corrupting a stream? missing an alert? missing an attack?) but no kernel crash should take place. The Linux kernel CVE team has assigned CVE-2025-38616 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 84c61fe1a75b4255df1e1e7c054c9e6d048da417 and fixed in 6.12.43 with commit eb0336f213fe88bbdb7d2b19c9c9ec19245a3155 Issue introduced in 6.0 with commit 84c61fe1a75b4255df1e1e7c054c9e6d048da417 and fixed in 6.15.11 with commit db3658a12d5ec4db7185ae7476151a50521b7207 Issue introduced in 6.0 with commit 84c61fe1a75b4255df1e1e7c054c9e6d048da417 and fixed in 6.16.2 with commit 2fb97ed9e2672b4f6e24ce206ac1a875ce4bcb38 Issue introduced in 6.0 with commit 84c61fe1a75b4255df1e1e7c054c9e6d048da417 and fixed in 6.17-rc2 with commit 6db015fc4b5d5f63a64a193f65d98da3a7fc811d 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-2025-38616 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: net/tls/tls.h net/tls/tls_strp.c net/tls/tls_sw.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/eb0336f213fe88bbdb7d2b19c9c9ec19245a3155 https://git.kernel.org/stable/c/db3658a12d5ec4db7185ae7476151a50521b7207 https://git.kernel.org/stable/c/2fb97ed9e2672b4f6e24ce206ac1a875ce4bcb38 https://git.kernel.org/stable/c/6db015fc4b5d5f63a64a193f65d98da3a7fc811d