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 26D322AF00 for ; Sat, 4 Oct 2025 15:17:19 +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=1759591041; cv=none; b=sq/q8qHFJBLywJQVkf7Rq64F58diNDAwwJvrEjonC5lckAaMu5DU0Rswnygqu3pRj+gsNxWEGhUMu23kB6PN+aGt0ImMqf/T4S9ABuYMOQR6bQKNjCgLtF5kn/m4spwQoZkIADejuTTadMCmX7VjBr+aMtBWBO90fmEuvR2yFwY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759591041; c=relaxed/simple; bh=csEs+o+s03l11BAizVw671+2tc0ddovA9Hd4QmGoWQs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gacyu82PRCQD1maKcoiY8p1ssemi63mSrQRBpdYf63bkV8gAPZV/TGzzLGTVurEjodfni/rekNYvv9Z5SpHNRZt5MD4+cyZtsOg3giUDoHNi7aiPpHselIh+UrP+29TKOlYMWA+UdPE1VMcAJ0kJUZfKu9SpqYfFHZw2o8br1QY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=O3frPT3B; 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="O3frPT3B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D455C4CEF1; Sat, 4 Oct 2025 15:17:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759591039; bh=csEs+o+s03l11BAizVw671+2tc0ddovA9Hd4QmGoWQs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=O3frPT3BzqfJeMemQDYmt3LaOfVQRzp1jmVbpmc22NccoWxTa2znxWJTbbY+40qtX n5DIgBd2B+fpSlKI7XfPPMBJCoLrw9XZ/iQyA+sID3UlCLWbsOfl3ZcHFutA/tnKE1 xZEHRtgrio3v6MIox3S2ide5NIqxI7meWqfq4xu4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50485: ext4: add EXT4_IGET_BAD flag to prevent unexpected bad inode Date: Sat, 4 Oct 2025 17:16:44 +0200 Message-ID: <2025100441-CVE-2022-50485-9d4c@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=2721; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=AdwwZ20iztLAac6eMu//4WJiLcXjgMCK8FidYUtuHi4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkPrSLVlrasEJn793nLzj8zpLafP7elx+XGj8/n51e+a ZNhd2J50BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATsVBmmCtwv777LoOxy4WC Aj/n2l1zDif1xjPM03z987Xq9n5joToxpYdltvNSBDQYAA== 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: add EXT4_IGET_BAD flag to prevent unexpected bad inode There are many places that will get unhappy (and crash) when ext4_iget() returns a bad inode. However, if iget the boot loader inode, allows a bad inode to be returned, because the inode may not be initialized. This mechanism can be used to bypass some checks and cause panic. To solve this problem, we add a special iget flag EXT4_IGET_BAD. Only with this flag we'd be returning bad inode from ext4_iget(), otherwise we always return the error code if the inode is bad inode.(suggested by Jan Kara) The Linux kernel CVE team has assigned CVE-2022-50485 to this issue. Affected and fixed versions =========================== Fixed in 5.4.229 with commit 2142dfa1de61e25b83198af0308ec7689cca25d3 Fixed in 5.10.163 with commit c0a738875c2e9c8c3366d792f8bf7fe508d5e5a5 Fixed in 5.15.87 with commit f7e6b5548f915d7aa435d0764d41eacfb49c6e09 Fixed in 6.0.18 with commit f725b290ed79ad61e4f721fee95a287892d8b1ad Fixed in 6.1.4 with commit 488a5c2bf7543c3cd3f07a025f2e62be91599430 Fixed in 6.2 with commit 63b1e9bccb71fe7d7e3ddc9877dbdc85e5d2d023 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-50485 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/ext4.h fs/ext4/inode.c fs/ext4/ioctl.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/2142dfa1de61e25b83198af0308ec7689cca25d3 https://git.kernel.org/stable/c/c0a738875c2e9c8c3366d792f8bf7fe508d5e5a5 https://git.kernel.org/stable/c/f7e6b5548f915d7aa435d0764d41eacfb49c6e09 https://git.kernel.org/stable/c/f725b290ed79ad61e4f721fee95a287892d8b1ad https://git.kernel.org/stable/c/488a5c2bf7543c3cd3f07a025f2e62be91599430 https://git.kernel.org/stable/c/63b1e9bccb71fe7d7e3ddc9877dbdc85e5d2d023