Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 9005C3F5BED for ; Wed, 27 May 2026 12:24:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779884696; cv=none; b=PFweSVu2T8JCZmwjlHuCOHyVc6sbYpLM3DN6RIvppR2FtQBI3uRRh/5Hfmgp8TSNvH7cSZcv0Y+MBnKzNhHnl0kd4KeytFq8a4s4OUG7t1Q4TqMLi/nx66gyqnn6u/RHhtZe9sRoUZmkonvPA4xJTt+O9SDvTYqPCyAsu/1rR0Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779884696; c=relaxed/simple; bh=o0oXmT7oC3S1nWa6OKuR1f1fJPst0Ua4+RiLJ27tu9g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Z/kA86h8xNNnb8qJaWjLXSouTNiF6QSwQO+DILm1cUBB59CkYRX2JIv/DpTalaMvjloVJIncAi/T48A4MTeVD++28g/UxSVu/aNyfsecQ/5ZVkuSMEOO4K4VvNWl8j2YKH7KhSpCDYxJaJLL7MPT3bGfoauvTH/SZLSweWfJIMg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xNWjIEdJ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xNWjIEdJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5BBF1F00A3C; Wed, 27 May 2026 12:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779884695; bh=55kgQGtdwOG+u/jhhQyaStPBmo+yzTlJI6EkO29kTos=; h=From:To:Cc:Subject:Date:Reply-To; b=xNWjIEdJhKYGnDexv1Wpbd84kKCRBmFAhFWwPoym42uMTVBuB/S1DplC3aCQypI+7 imqgV2SGG6YIUnCfi+8wdNjsjD/C4slA3F4xigRMrmu5ZBeYCQsofFZDDW3E5T/Hvj scoKeI91vQ9wIWcz3cLa9R8/F9+jmoJVwAArurlE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-45942: ext4: fix e4b bitmap inconsistency reports Date: Wed, 27 May 2026 14:19:44 +0200 Message-ID: <2026052729-CVE-2026-45942-fe56@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4686; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=I/oUmButtyYhjtyFGfKCT1QmNq3eklvSlw5upJkcdmc=; b=owGbwMvMwCRo6H6F97bub03G02pJDFliD0VTtDbNYtHuksrR3xFXGLyVc9pRs8NGB2zXajYcC UyRWsTUEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABMJusmwYPbNuF6eB6bKbFoB OutdDpz72XgvkmE2620D0Uv36pfx8Ljv8og/ny/RrbMcAA== 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 e4b bitmap inconsistency reports A bitmap inconsistency issue was observed during stress tests under mixed huge-page workloads. Ext4 reported multiple e4b bitmap check failures like: ext4_mb_complex_scan_group:2508: group 350, 8179 free clusters as per group info. But got 8192 blocks Analysis and experimentation confirmed that the issue is caused by a race condition between page migration and bitmap modification. Although this timing window is extremely narrow, it is still hit in practice: folio_lock ext4_mb_load_buddy __migrate_folio check ref count folio_mc_copy __filemap_get_folio folio_try_get(folio) ...... mb_mark_used ext4_mb_unload_buddy __folio_migrate_mapping folio_ref_freeze folio_unlock The root cause of this issue is that the fast path of load_buddy only increments the folio's reference count, which is insufficient to prevent concurrent folio migration. We observed that the folio migration process acquires the folio lock. Therefore, we can determine whether to take the fast path in load_buddy by checking the lock status. If the folio is locked, we opt for the slow path (which acquires the lock) to close this concurrency window. Additionally, this change addresses the following issues: When the DOUBLE_CHECK macro is enabled to inspect bitmap-related issues, the following error may be triggered: corruption in group 324 at byte 784(6272): f in copy != ff on disk/prealloc Analysis reveals that this is a false positive. There is a specific race window where the bitmap and the group descriptor become momentarily inconsistent, leading to this error report: ext4_mb_load_buddy ext4_mb_load_buddy __filemap_get_folio(create|lock) folio_lock ext4_mb_init_cache folio_mark_uptodate __filemap_get_folio(no lock) ...... mb_mark_used mb_mark_used_double mb_cmp_bitmaps mb_set_bits(e4b->bd_bitmap) folio_unlock The original logic assumed that since mb_cmp_bitmaps is called when the bitmap is newly loaded from disk, the folio lock would be sufficient to prevent concurrent access. However, this overlooks a specific race condition: if another process attempts to load buddy and finds the folio is already in an uptodate state, it will immediately begin using it without holding folio lock. The Linux kernel CVE team has assigned CVE-2026-45942 to this issue. Affected and fixed versions =========================== Fixed in 6.6.130 with commit 57e83bfbe1e412ac42daced2086f3c6f9a17bba0 Fixed in 6.12.75 with commit c05033cfc5c7699cd4df8d48cef94d01da755f24 Fixed in 6.18.14 with commit 29a07d691d282faf38c33d4b61839b89399110f9 Fixed in 6.19.4 with commit f29709a7a3fc38f5015d850504762cdef0e151f9 Fixed in 7.0 with commit bdc56a9c46b2a99c12313122b9352b619a2e719e 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-2026-45942 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/mballoc.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/57e83bfbe1e412ac42daced2086f3c6f9a17bba0 https://git.kernel.org/stable/c/c05033cfc5c7699cd4df8d48cef94d01da755f24 https://git.kernel.org/stable/c/29a07d691d282faf38c33d4b61839b89399110f9 https://git.kernel.org/stable/c/f29709a7a3fc38f5015d850504762cdef0e151f9 https://git.kernel.org/stable/c/bdc56a9c46b2a99c12313122b9352b619a2e719e