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 B14241BD9D2 for ; Wed, 16 Apr 2025 14:15:31 +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=1744812931; cv=none; b=T/cWjDIPFTrYUyrjryTJ96sgsSJfTBGXTN7tRaS/9YBxutlKsnlGZHxA3Qy+PbQpSnXQ6J3aYCJtH0sNg/jJXxjf5pVbyVnfG4m8SdmAuYMBrjGYSY3C2OuWZlsszTx9xSvAdWRrtshW5Qbt6NISXk6AMJCP8Sl0dKi6bAB+9bk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744812931; c=relaxed/simple; bh=HnBJhPKtMMa+BW1nZYk6lpBhOh7vuKu6aOJCOZ3Idu4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=U5H9F90McVrOvfAmadycGIPXapw9tQWOdKQPWeWA43xUOv5Jkip898m/LAsVOiD2pQDR9sjmBSNtYk+j6XxEaScGAxdTUB6ZGdLoD/PTIyW19SSU+e9ARKrHknDVq/6095U7UODx6XtMkRCSqfAtB142xZWT0pKsB3aafYoF7OU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jLrPKJND; 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="jLrPKJND" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4588FC4CEE4; Wed, 16 Apr 2025 14:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744812931; bh=HnBJhPKtMMa+BW1nZYk6lpBhOh7vuKu6aOJCOZ3Idu4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jLrPKJNDRXCtA6LeQHgjw4jGIPsOwxC967cwH/i8DGT2MVCX+wlSFjbMPFMV4rDby UGdzxZs3/1ON+llXUk9xUJI98cHpooDdCH7/xKZN2sxD1OVaTV6YWwdMGtU4AeH013 xD2u4BvIPx3fRzlgo/Cf/NMeGZS3ADryOSec3/dE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-22036: exfat: fix random stack corruption after get_block Date: Wed, 16 Apr 2025 16:12:07 +0200 Message-ID: <2025041658-CVE-2025-22036-6469@gregkh> X-Mailer: git-send-email 2.49.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=3424; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=HnBJhPKtMMa+BW1nZYk6lpBhOh7vuKu6aOJCOZ3Idu4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn/d61bI3Dz5NobbDt1vTyCfP5LBWm7rF9b32++eIf4L UsXtqgJHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRFXIMCzZbfNpy5VKfhY9l OIPLnphXhu1bihkWXL9w7E7dhYmLeo6Fxwhsf3Zh9ZSZyQA= 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: exfat: fix random stack corruption after get_block When get_block is called with a buffer_head allocated on the stack, such as do_mpage_readpage, stack corruption due to buffer_head UAF may occur in the following race condition situation. mpage_read_folio <> do_mpage_readpage exfat_get_block bh_read __bh_read get_bh(bh) submit_bh wait_on_buffer ... end_buffer_read_sync __end_buffer_read_notouch unlock_buffer <> ... ... ... ... <> . . another_function <> put_bh(bh) atomic_dec(bh->b_count) * stack corruption here * This patch returns -EAGAIN if a folio does not have buffers when bh_read needs to be called. By doing this, the caller can fallback to functions like block_read_full_folio(), create a buffer_head in the folio, and then call get_block again. Let's do not call bh_read() with on-stack buffer_head. The Linux kernel CVE team has assigned CVE-2025-22036 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit 11a347fb6cef62ce47e84b97c45f2b2497c7593b and fixed in 6.12.23 with commit 49b0a6ab8e528a0c1c50e37cef9b9c7c121365f2 Issue introduced in 6.8 with commit 11a347fb6cef62ce47e84b97c45f2b2497c7593b and fixed in 6.13.11 with commit f7447286363dc1e410bf30b87d75168f3519f9cc Issue introduced in 6.8 with commit 11a347fb6cef62ce47e84b97c45f2b2497c7593b and fixed in 6.14.2 with commit f807a6bf2005740fa26b4f59c4a003dc966b9afd Issue introduced in 6.8 with commit 11a347fb6cef62ce47e84b97c45f2b2497c7593b and fixed in 6.15-rc1 with commit 1bb7ff4204b6d4927e982cd256286c09ed4fd8ca 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-22036 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: fs/exfat/inode.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/49b0a6ab8e528a0c1c50e37cef9b9c7c121365f2 https://git.kernel.org/stable/c/f7447286363dc1e410bf30b87d75168f3519f9cc https://git.kernel.org/stable/c/f807a6bf2005740fa26b4f59c4a003dc966b9afd https://git.kernel.org/stable/c/1bb7ff4204b6d4927e982cd256286c09ed4fd8ca