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 4031D39023D for ; Sun, 19 Jul 2026 12:03:35 +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=1784462617; cv=none; b=m6DHv+pu8arNc8//EsKlZ4UObxxC3HcpN5xvlIUm3+a6EZNcHgw3c/wG4utzLz88NVj2CLAKWbNBtHVoJnPKg07x6BPoa9eAqFbVrmoLiUj1r0Jzacdx9BWuFhg/iIYOs44jl2P+cp1qbU0Xbuj0FdS7srYqfmZ73OYsRDSQ904= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784462617; c=relaxed/simple; bh=nJilpua+ECBNPKUSbuvEQiIy7oL+PTMVJZqJJ+QDjUI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QVbeZsEVwD/abv9iEnFS1WMC9frL+O6WBj8392OvOSvO/fcbSSY94Lms5pJJdmjpoj3Eka97cS5RPIHMpmwdlfMKiYu/FjDHgO7pIp/3vDroId4mnegqtdkCvmotEfrgFO7MvAlJixxb35okzfm7a7eJBfBUiwtmf8etBJj2PEQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xhNFo0WD; 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="xhNFo0WD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 631F81F000E9; Sun, 19 Jul 2026 12:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784462615; bh=01Adwwj6RC/QmJWYUz56KrjcH0JokohOMmzirqanX7Y=; h=From:To:Cc:Subject:Date:Reply-To; b=xhNFo0WDwtb8kUeO2SOqGGWedsVFEsr7wrVSwQ3PGxcJGOfOh0ExQ9OyZId70RrpG xm+t1qpM32LvyCLdxQd86vxL5vcKzJMvC3miEKeDWTWEKEu6qoeYs96Y4fvhyZjPAD cXa/En1rcjustjMenpvWogu8qg4BwDEJvhhNQ5lU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-63815: f2fs: bound i_inline_xattr_size for non-inline-xattr inodes Date: Sun, 19 Jul 2026 14:02:32 +0200 Message-ID: <2026071904-CVE-2026-63815-4dba@gregkh> X-Mailer: git-send-email 2.55.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=4070; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=mgbYgUiwLfCBKGgIWl7Gkf3aD7GLT5JUYy8mRXvcoPM=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkxe/bMTf0r1/CE7zjTumqRG3JpGinvJy8qC4ztdlF3F xXbW8TVEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPhfsEw33dp04mcwM/Plcpu 3Zz19WTp917neQwLNuw4ucTHIEf4Fb+1UlKx+76Zs9QvAAA= 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: f2fs: bound i_inline_xattr_size for non-inline-xattr inodes When the flexible_inline_xattr feature is enabled, do_read_inode() loads the on-disk i_inline_xattr_size unconditionally: if (f2fs_sb_has_flexible_inline_xattr(sbi)) fi->i_inline_xattr_size = le16_to_cpu(ri->i_inline_xattr_size); but sanity_check_inode() only range-checks it when the inode also has the FI_INLINE_XATTR flag set. An inode that carries an inline dentry or inline data but not FI_INLINE_XATTR -- the normal layout for an inline directory -- therefore keeps a fully attacker-controlled i_inline_xattr_size from a crafted image. get_inline_xattr_addrs() returns that value with no flag gating, so it feeds the inode geometry: MAX_INLINE_DATA() = 4 * (CUR_ADDRS_PER_INODE - i_inline_xattr_size - 1) NR_INLINE_DENTRY() = MAX_INLINE_DATA() * BITS_PER_BYTE / (...) addrs_per_page() = CUR_ADDRS_PER_INODE - i_inline_xattr_size A large i_inline_xattr_size drives MAX_INLINE_DATA() and NR_INLINE_DENTRY() negative, so make_dentry_ptr_inline() sets d->max (int) to a negative value. The inline directory walk then compares an unsigned long bit_pos against that negative d->max, which is promoted to a huge unsigned bound, and reads far past the inline area: while (bit_pos < d->max) /* fs/f2fs/dir.c */ ... test_bit_le(bit_pos, d->bitmap) / d->dentry[bit_pos] ... Mounting a crafted image and reading such a directory triggers an out-of-bounds read in f2fs_fill_dentries(); the same underflow also corrupts ADDRS_PER_INODE for regular files. Validate i_inline_xattr_size against MAX_INLINE_XATTR_SIZE whenever the flexible_inline_xattr feature is enabled -- i.e. whenever the value is loaded from disk and consumed -- and keep the lower MIN_INLINE_XATTR_SIZE bound gated on inodes that actually carry an inline xattr, so legitimate inodes with i_inline_xattr_size == 0 are still accepted. The Linux kernel CVE team has assigned CVE-2026-63815 to this issue. Affected and fixed versions =========================== Issue introduced in 4.15 with commit 6afc662e68b5f988282ff20afd58a89b1c279dca and fixed in 6.12.96 with commit 2a9f9791653ba5ed3fb45bbffa8d63a7cd5cf706 Issue introduced in 4.15 with commit 6afc662e68b5f988282ff20afd58a89b1c279dca and fixed in 6.18.39 with commit 4ce2d52f680c1d8bfdad7cce05b815ea7ca9790d Issue introduced in 4.15 with commit 6afc662e68b5f988282ff20afd58a89b1c279dca and fixed in 7.1.3 with commit 16bc237ce3c483b75575abea53cfb639745311ed Issue introduced in 4.15 with commit 6afc662e68b5f988282ff20afd58a89b1c279dca and fixed in 7.2-rc1 with commit 378acf3cf19b6af6cba55e8dd1154c4e1504bae8 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-63815 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/f2fs/inode.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/2a9f9791653ba5ed3fb45bbffa8d63a7cd5cf706 https://git.kernel.org/stable/c/4ce2d52f680c1d8bfdad7cce05b815ea7ca9790d https://git.kernel.org/stable/c/16bc237ce3c483b75575abea53cfb639745311ed https://git.kernel.org/stable/c/378acf3cf19b6af6cba55e8dd1154c4e1504bae8