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 2A9694A2D for ; Tue, 27 Feb 2024 18:41:14 +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=1709059275; cv=none; b=nWrhAZT2RBE14JieO0S2kX7q3MzLRm+X+M+MnFuyJTxUhtumvr0iHqd/qs+yz89ZbOyvI9flpkIltcM+pxgkPgDwUJ/+vdg/KPKnXog90CtJR+QtJ019vb9xUhWXSp5/Fo5X2DXz23wtJumcSYoINZWuDqu1dAqX5Fgxct0Kwws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709059275; c=relaxed/simple; bh=LeAyXLcXUgV9qXnvhyR6g24DuemyFiuMdv/9ThrgWjY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YVfqsVkkI8janc4QOZX61lK4VPc9j1GtJxe9uYRHr/rJDzONyzeAVi3+wDKY9q175w5PDLdF32M74beYhhPSp0jQY7+zTfABbjmrVww6m6f3opnWTzVBAHgAU7QJmD9jgIIGQ2LlYr3TaugUjVNmuFKd0bFDHlO+NZykjURLtE0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=K/a08Ym4; 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="K/a08Ym4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 484CAC433F1; Tue, 27 Feb 2024 18:41:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709059274; bh=LeAyXLcXUgV9qXnvhyR6g24DuemyFiuMdv/9ThrgWjY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=K/a08Ym4DIhYDkkVo5E8CP+hcC4fXYeN9raBhcaaMtPAAg3qWjVyQ0+VdiYK9HAxK 7huJg27U5IZHs0tDvKFWHtQVz2fiEHL9HPXjptoSbYDabtmB3r1s+74aI/8zwP7dEQ GpDvoQ33Xa/9ibXsl8tQLqLonpd6BI1rZAXZuuo4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-46946: ext4: fix check to prevent false positive report of incorrect used inodes Date: Tue, 27 Feb 2024 19:40:48 +0100 Message-ID: <20240227184057.2368370-11-gregkh@linuxfoundation.org> 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: , Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: ext4: fix check to prevent false positive report of incorrect used inodes Commit <50122847007> ("ext4: fix check to prevent initializing reserved inodes") check the block group zero and prevent initializing reserved inodes. But in some special cases, the reserved inode may not all belong to the group zero, it may exist into the second group if we format filesystem below. mkfs.ext4 -b 4096 -g 8192 -N 1024 -I 4096 /dev/sda So, it will end up triggering a false positive report of a corrupted file system. This patch fix it by avoid check reserved inodes if no free inode blocks will be zeroed. The Linux kernel CVE team has assigned CVE-2021-46946 to this issue. Affected and fixed versions =========================== Issue introduced in 4.4.148 with commit 7736fcede789 and fixed in 4.4.269 with commit 539ba4ebc467 Issue introduced in 4.9.120 with commit 954e572ae2f2 and fixed in 4.9.269 with commit d2e121be8d31 Issue introduced in 4.14.60 with commit f547aa20b4f6 and fixed in 4.14.233 with commit e70db6e43286 Issue introduced in 4.18 with commit 50122847007 and fixed in 4.19.191 with commit 7687f5aba0f5 Issue introduced in 4.18 with commit 50122847007 and fixed in 5.4.118 with commit 9c61387630a5 Issue introduced in 4.18 with commit 50122847007 and fixed in 5.10.36 with commit 098b257563b9 Issue introduced in 4.18 with commit 50122847007 and fixed in 5.11.20 with commit f42789ee5f96 Issue introduced in 4.18 with commit 50122847007 and fixed in 5.12.3 with commit e18d76a12b34 Issue introduced in 4.18 with commit 50122847007 and fixed in 5.13 with commit a149d2a5cabb Please see https://www.kernel.org or 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-2021-46946 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/ialloc.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/539ba4ebc467260225898e67ea53cbb73308f894 https://git.kernel.org/stable/c/d2e121be8d318524a61e13ca15b5bfab2d0b63c7 https://git.kernel.org/stable/c/e70db6e43286a17c3dfc840fcee662de183b6a81 https://git.kernel.org/stable/c/7687f5aba0f50c7ff8040e506bae184e59c8e7b8 https://git.kernel.org/stable/c/9c61387630a54e35b96a90608aafd369ffb86f39 https://git.kernel.org/stable/c/098b257563b959f4ca6c1d82fde0ee727792cb19 https://git.kernel.org/stable/c/f42789ee5f96743cdb5f69445cab3609458733f7 https://git.kernel.org/stable/c/e18d76a12b34791bc0318a0e0c0fa5863cd8dabf https://git.kernel.org/stable/c/a149d2a5cabbf6507a7832a1c4fd2593c55fd450