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 5E75D26A0B9 for ; Tue, 16 Dec 2025 14:45:27 +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=1765896328; cv=none; b=jMrsYZW/EasFVvM3qEXMOlXvBw9JMXTrGPBdg3u/oL1148o16swQKIn8Ldgk9v/1jSPhBPgBciA2v4ugc+Pg/PDmzX8jyknkTLIiGy6gVZQfS6zY1IaxXvJPgy418SKMzbmnN42DoWZPWGBRekde9r7AQVARBYBYfrG65Rdce3s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765896328; c=relaxed/simple; bh=coSJGjl3BdScAHTZaBJo9BuEHCgUNaoqbpvwqtGT8rA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=f7cXh3s+I0LAuiXHDcT5FgleCL+0ve1lAO8sVVuwt38Z9kNGUGLWxf2fGrx/7lLXZcNibiYByBSfZYXVZ9Xn9xJn+quvTQLIuNB/3cAmYsV59Kgd9VMX0JHXqUp29kEF9lUDVi36K9greRNHPGUHmCU9N+vCdmhWVwUUiJ8VHsg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xPbH/1x6; 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="xPbH/1x6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C591C4CEF1; Tue, 16 Dec 2025 14:45:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765896327; bh=coSJGjl3BdScAHTZaBJo9BuEHCgUNaoqbpvwqtGT8rA=; h=From:To:Cc:Subject:Date:Reply-To:From; b=xPbH/1x6HetOctHkoiaEKEqLS07Y2gtweLocbcIjwRCTzLkvjUu+cmpQltRaksM8i tNKnGrqcNE7vh+HwTFtORxM5h62PXPo03yo/VI7ANHfGGIE8UfNVjXq8j3qxI7bG5G nJg1zcX6lVbiJHQa3EVzPZLszFvyKpyDMeZEZ8wA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68264: ext4: refresh inline data size before write operations Date: Tue, 16 Dec 2025 15:45:21 +0100 Message-ID: <2025121615-CVE-2025-68264-6768@gregkh> X-Mailer: git-send-email 2.52.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=3348; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=maT6Jc73+OiEIthmikrrrQZyPBDMnk/NOLSZUyP3NLg=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOBdWdnA8SNbZWfUsWyv+bG3NRWqtwdWKL8d4LqYaHS rOsJPs7YlkYBJkYZMUUWb5s4zm6v+KQopeh7WmYOaxMIEMYuDgFYCJHTjDMs/l88+qdzqBJIbYq qV09//757DKKZ1iw4bheSO/pGWqcy5k4n++4pVMp7SAJAA== 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: refresh inline data size before write operations The cached ei->i_inline_size can become stale between the initial size check and when ext4_update_inline_data()/ext4_create_inline_data() use it. Although ext4_get_max_inline_size() reads the correct value at the time of the check, concurrent xattr operations can modify i_inline_size before ext4_write_lock_xattr() is acquired. This causes ext4_update_inline_data() and ext4_create_inline_data() to work with stale capacity values, leading to a BUG_ON() crash in ext4_write_inline_data(): kernel BUG at fs/ext4/inline.c:1331! BUG_ON(pos + len > EXT4_I(inode)->i_inline_size); The race window: 1. ext4_get_max_inline_size() reads i_inline_size = 60 (correct) 2. Size check passes for 50-byte write 3. [Another thread adds xattr, i_inline_size changes to 40] 4. ext4_write_lock_xattr() acquires lock 5. ext4_update_inline_data() uses stale i_inline_size = 60 6. Attempts to write 50 bytes but only 40 bytes actually available 7. BUG_ON() triggers Fix this by recalculating i_inline_size via ext4_find_inline_data_nolock() immediately after acquiring xattr_sem. This ensures ext4_update_inline_data() and ext4_create_inline_data() work with current values that are protected from concurrent modifications. This is similar to commit a54c4613dac1 ("ext4: fix race writing to an inline_data file while its xattrs are changing") which fixed i_inline_off staleness. This patch addresses the related i_inline_size staleness issue. The Linux kernel CVE team has assigned CVE-2025-68264 to this issue. Affected and fixed versions =========================== Fixed in 6.12.62 with commit 210ac60a86a3ad2c76ae60e0dc71c34af6e7ea0b Fixed in 6.17.12 with commit ca43ea29b4c4d2764aec8a26cffcfb677a871e6e Fixed in 6.18.1 with commit 58df743faf21ceb1880f930aa5dd428e2a5e415d Fixed in 6.19-rc1 with commit 892e1cf17555735e9d021ab036c36bc7b58b0e3b 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-2025-68264 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/inline.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/210ac60a86a3ad2c76ae60e0dc71c34af6e7ea0b https://git.kernel.org/stable/c/ca43ea29b4c4d2764aec8a26cffcfb677a871e6e https://git.kernel.org/stable/c/58df743faf21ceb1880f930aa5dd428e2a5e415d https://git.kernel.org/stable/c/892e1cf17555735e9d021ab036c36bc7b58b0e3b