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 3C51D2E2DD8 for ; Wed, 1 Oct 2025 11:52:45 +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=1759319566; cv=none; b=gAQUKkHA46RsM+0716ZmZDkP1hMDKa+A/HClA4ZVtvEank+7xwJhMX4miwhRnXfGWbBtSTt1VZ2J90n7/njVI+td0YbrfO+MdbVRUf9kMDXgDIOxJIUSF0zC9Sp9luEbQ8mGz1V4WmmoDw7lRMaUhSnw3K/LIdxmQSCCIMFHims= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759319566; c=relaxed/simple; bh=r1tjoa0mSRBBeTEWjtg4Ya8JTXQMZe7jyFsvmmnK3Uw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PxwwSbgFDodH6hVrh+rs95HzJy5mDUX3dyjLPtYBFK126H7v0mG69uEG7vFPzyrSc1hEalZEeZq6kAeBrHwriAj1BIXftaxGumVZkBDVgYUjqQ81sz3AvZ4YGDyPYyP/7Fmj8E3X5axJq2D1jsPY3i0e6Vvhnzdfnn0KQ4DB9qQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=v9gJXgE5; 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="v9gJXgE5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5ED74C4CEF4; Wed, 1 Oct 2025 11:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759319565; bh=r1tjoa0mSRBBeTEWjtg4Ya8JTXQMZe7jyFsvmmnK3Uw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=v9gJXgE5L3vGCzgaU2AH5rr4bUurUcjygxIapn0MGfaEiyVXIY/tGfsk7GeiCw5D6 4/eEhk9g8BNnZMw7gWcbxL7F+ENcZLiJjPiDXRewsOU2Fva6bmmWVAVtZBn2RDfP7n Bknis+QjO5AzKrd9O62QvJ/GYxbHbP/3Un3yhqFk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50428: ext4: fix off-by-one errors in fast-commit block filling Date: Wed, 1 Oct 2025 13:42:01 +0200 Message-ID: <2025100157-CVE-2022-50428-0c76@gregkh> X-Mailer: git-send-email 2.51.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=3502; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=am8gkNhl8X+fE2s81mTeA2ic2yvwly9QoZ8FpEoZRXw=; b=owGbwMvMwCRo6H6F97bub03G02pJDBl3hVunhyWEPKl+Ec+y8nn26WOvzNPlE9SMFno+2GS1s c9mmoNBRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzEJoBhfvV/A6EJuy/xTLHh LHw1+VXw7+PMOQzzdK2/3LnbP71fZPnRqyenZ7pYVPt/BAA= 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: ext4: fix off-by-one errors in fast-commit block filling Due to several different off-by-one errors, or perhaps due to a late change in design that wasn't fully reflected in the code that was actually merged, there are several very strange constraints on how fast-commit blocks are filled with tlv entries: - tlvs must start at least 10 bytes before the end of the block, even though the minimum tlv length is 8. Otherwise, the replay code will ignore them. (BUG: ext4_fc_reserve_space() could violate this requirement if called with a len of blocksize - 9 or blocksize - 8. Fortunately, this doesn't seem to happen currently.) - tlvs must end at least 1 byte before the end of the block. Otherwise the replay code will consider them to be invalid. This quirk contributed to a bug (fixed by an earlier commit) where uninitialized memory was being leaked to disk in the last byte of blocks. Also, strangely these constraints don't apply to the replay code in e2fsprogs, which will accept any tlvs in the blocks (with no bounds checks at all, but that is a separate issue...). Given that this all seems to be a bug, let's fix it by just filling blocks with tlv entries in the natural way. Note that old kernels will be unable to replay fast-commit journals created by kernels that have this commit. The Linux kernel CVE team has assigned CVE-2022-50428 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e and fixed in 5.15.87 with commit 18f28f13301d1afb8cea9c4ddcecdbff14488ec6 Issue introduced in 5.10 with commit aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e and fixed in 6.0.18 with commit 5ca65dffdead16572ca046c43fb576b227f7f635 Issue introduced in 5.10 with commit aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e and fixed in 6.1.4 with commit 5439ad45c0d0c8db41eb6f4dce6f778f15a5ee16 Issue introduced in 5.10 with commit aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e and fixed in 6.2 with commit 48a6a66db82b8043d298a630f22c62d43550cae5 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-2022-50428 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/ext4/fast_commit.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/18f28f13301d1afb8cea9c4ddcecdbff14488ec6 https://git.kernel.org/stable/c/5ca65dffdead16572ca046c43fb576b227f7f635 https://git.kernel.org/stable/c/5439ad45c0d0c8db41eb6f4dce6f778f15a5ee16 https://git.kernel.org/stable/c/48a6a66db82b8043d298a630f22c62d43550cae5