From mboxrd@z Thu Jan 1 00:00:00 1970 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 E5C5D210E4 for ; Thu, 4 Apr 2024 08:24:04 +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=1712219045; cv=none; b=Sis394Lw61IYv3g51qgpf25xAPzVcW1NIy1Bw9LiCpS8fUX4AxOrmZ5wb17ZNyX4TLY8lLvC9LXDsG5lOQAt4gV/jBpUFByo6M/aA06nU685jvkY0pU+ShpnTSbzQAXXITGCtybb6ockEq5GnbjiSQVw2/L4Y/wWWqubVaTAvw0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712219045; c=relaxed/simple; bh=bguObsACvehO5nd0z5BaqcaYKrLBh2lhWpMlrdQFZdo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gpeIrMybgfraqO66D+xZBALMLt/9ESScwowcb2oBeeb7ma3iyXxrX/ZAUMxkFfirCU7W7G+FylV2go2vU5wJlWYlPHlzJNXBQdx80eiLuPaVVG+7JaT697/TOnIxa+0mImn3SZoo9GVAG5K6Evb/U0fVv4Xzr3cmZyJkoB7uu/8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Lg8qup99; 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="Lg8qup99" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51F27C433C7; Thu, 4 Apr 2024 08:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712219044; bh=bguObsACvehO5nd0z5BaqcaYKrLBh2lhWpMlrdQFZdo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Lg8qup99vrqaP894mvGkF/LK7l1zhh0ySoDQFTNDPs5tXpBMt7bLEvL4/wkzqHDxt dY94ckyzhXvPhF6K5L5Kz142uAahwIc0/gm1vnX5OwelCZ1KgWzYW+27NaYZacwUoU 1d4SFYXykUDnzIemStqkSuWEmkQHsDI/m92sa2yQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26800: tls: fix use-after-free on failed backlog decryption Date: Thu, 4 Apr 2024 10:23:17 +0200 Message-ID: <2024040403-CVE-2024-26800-0bf4@gregkh> X-Mailer: git-send-email 2.44.0 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=2494; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bguObsACvehO5nd0z5BaqcaYKrLBh2lhWpMlrdQFZdo=; b=owGbwMvMwCRo6H6F97bub03G02pJDGl8yek+/1WtxfyNpxxTNGF8y7/wxlTBU8v3X3JZeejds RPuQnZbO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiatkMC2a4TNjeFZ6dnDLN fMWS6avTWm8+DmZYcFlp2Rmb4z7/je4Fd93JFw78o3lRHQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: tls: fix use-after-free on failed backlog decryption When the decrypt request goes to the backlog and crypto_aead_decrypt returns -EBUSY, tls_do_decryption will wait until all async decryptions have completed. If one of them fails, tls_do_decryption will return -EBADMSG and tls_decrypt_sg jumps to the error path, releasing all the pages. But the pages have been passed to the async callback, and have already been released by tls_decrypt_done. The only true async case is when crypto_aead_decrypt returns -EINPROGRESS. With -EBUSY, we already waited so we can tell tls_sw_recvmsg that the data is available for immediate copy, but we need to notify tls_decrypt_sg (via the new ->async_done flag) that the memory has already been released. The Linux kernel CVE team has assigned CVE-2024-26800 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.18 with commit 13eca403876b and fixed in 6.6.21 with commit 81be85353b0f Issue introduced in 6.7.6 with commit ab6397f072e5 and fixed in 6.7.9 with commit 1ac9fb84bc7e 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-2024-26800 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_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/f2b85a4cc763841843de693bbd7308fe9a2c4c89 https://git.kernel.org/stable/c/81be85353b0f5a7b660635634b655329b429eefe https://git.kernel.org/stable/c/1ac9fb84bc7ecd4bc6428118301d9d864d2a58d1 https://git.kernel.org/stable/c/13114dc5543069f7b97991e3b79937b6da05f5b0