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 3396C13A87C for ; Fri, 13 Sep 2024 05:31:09 +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=1726205469; cv=none; b=B+fVNDSOv+uPFcA0HGgAYxus7LILwBqpHi4Ng2PhYVDpGiXamiJ1W5C7bxhvoXt7yHZwpaoz9ZQWiIp0b5toXJPB1RcT5Uz10nnqPFVhjjKyH0oQwH72bOsB6qz8fbrYjwU0kagjsVe6nlUq5gnt+io/Rp5Rvtd6aygxPgal/Ik= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726205469; c=relaxed/simple; bh=ek0dFSzzweB6F74pmXyz96vEsvDbG4ZLVEwYfWBUbQU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OQbK7IlskJtjapuu0ISA+/jB8jVllmfK4n8AE2BRnBtkJHYTNlpkjt2ILzI2GIVgdTYT27TqlrOfzzkaUlOriOOPMhSICfP81fGUBIidM79drhIxcZdMrXzkXQLFoN92WNapWlFQ1qPPaH5Un52vo+CreW9seg+948P/Yy0pQLw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yvvixzd/; 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="yvvixzd/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF21BC4CEC0; Fri, 13 Sep 2024 05:31:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1726205469; bh=ek0dFSzzweB6F74pmXyz96vEsvDbG4ZLVEwYfWBUbQU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=yvvixzd/ynrTQSfMxPyzSp7BCO34OjKUzbRYIcl6O5FUPFAupWw+KaRao+eCNsABL 8uDXgE+sQ/m+LGmhohA3QPj1ec7qzrzEWdBLZdGo99u3sM+urRlImR7ZPJbrb+vhJ2 dEmUmnYkIfcqg5IG/Vn6YaM36Oi0Zjop+kC6rpu4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-46688: erofs: fix out-of-bound access when z_erofs_gbuf_growsize() partially fails Date: Fri, 13 Sep 2024 07:30:49 +0200 Message-ID: <2024091338-CVE-2024-46688-7a5a@gregkh> X-Mailer: git-send-email 2.46.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=2151; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ek0dFSzzweB6F74pmXyz96vEsvDbG4ZLVEwYfWBUbQU=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmPz/4/sPr+0gCPoiNpkqtbE1/qqa+L4tQXmbb02xmbx W6nZ4TodMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEvFYxLFhXsWxKzTqR85rd 1yYcDm8MXvCOM4Fhflbox47IdfKSCwWK5+T1/l/wnZXvLQA= 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: erofs: fix out-of-bound access when z_erofs_gbuf_growsize() partially fails If z_erofs_gbuf_growsize() partially fails on a global buffer due to memory allocation failure or fault injection (as reported by syzbot [1]), new pages need to be freed by comparing to the existing pages to avoid memory leaks. However, the old gbuf->pages[] array may not be large enough, which can lead to null-ptr-deref or out-of-bound access. Fix this by checking against gbuf->nrpages in advance. [1] https://lore.kernel.org/r/000000000000f7b96e062018c6e3@google.com The Linux kernel CVE team has assigned CVE-2024-46688 to this issue. Affected and fixed versions =========================== Issue introduced in 6.10 with commit d6db47e571dc and fixed in 6.10.8 with commit 49c0e0819980 Issue introduced in 6.10 with commit d6db47e571dc and fixed in 6.11-rc5 with commit 0005e01e1e87 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-46688 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/erofs/zutil.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/49c0e081998008cde0c872c0ff9affa1ece4b878 https://git.kernel.org/stable/c/0005e01e1e875c5e27130c5e2ed0189749d1e08a