CVE-2026-63815
Gravedad:
Pendiente de análisis
Tipo:
No Disponible / Otro tipo
Fecha de publicación:
19/07/2026
Última modificación:
19/07/2026
Descripción
*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
f2fs: bound i_inline_xattr_size for non-inline-xattr inodes<br />
<br />
When the flexible_inline_xattr feature is enabled, do_read_inode() loads<br />
the on-disk i_inline_xattr_size unconditionally:<br />
<br />
if (f2fs_sb_has_flexible_inline_xattr(sbi))<br />
fi->i_inline_xattr_size = le16_to_cpu(ri->i_inline_xattr_size);<br />
<br />
but sanity_check_inode() only range-checks it when the inode also has the<br />
FI_INLINE_XATTR flag set. An inode that carries an inline dentry or inline<br />
data but not FI_INLINE_XATTR -- the normal layout for an inline<br />
directory -- therefore keeps a fully attacker-controlled<br />
i_inline_xattr_size from a crafted image.<br />
<br />
get_inline_xattr_addrs() returns that value with no flag gating, so it<br />
feeds the inode geometry:<br />
<br />
MAX_INLINE_DATA() = 4 * (CUR_ADDRS_PER_INODE - i_inline_xattr_size - 1)<br />
NR_INLINE_DENTRY() = MAX_INLINE_DATA() * BITS_PER_BYTE / (...)<br />
addrs_per_page() = CUR_ADDRS_PER_INODE - i_inline_xattr_size<br />
<br />
A large i_inline_xattr_size drives MAX_INLINE_DATA() and NR_INLINE_DENTRY()<br />
negative, so make_dentry_ptr_inline() sets d->max (int) to a negative<br />
value. The inline directory walk then compares an unsigned long bit_pos<br />
against that negative d->max, which is promoted to a huge unsigned bound,<br />
and reads far past the inline area:<br />
<br />
while (bit_pos max) /* fs/f2fs/dir.c */<br />
... test_bit_le(bit_pos, d->bitmap) / d->dentry[bit_pos] ...<br />
<br />
Mounting a crafted image and reading such a directory triggers an<br />
out-of-bounds read in f2fs_fill_dentries(); the same underflow also<br />
corrupts ADDRS_PER_INODE for regular files.<br />
<br />
Validate i_inline_xattr_size against MAX_INLINE_XATTR_SIZE whenever the<br />
flexible_inline_xattr feature is enabled -- i.e. whenever the value is<br />
loaded from disk and consumed -- and keep the lower MIN_INLINE_XATTR_SIZE<br />
bound gated on inodes that actually carry an inline xattr, so legitimate<br />
inodes with i_inline_xattr_size == 0 are still accepted.



