CVE-2026-63815: f2fs: bound i_inline_xattr_size for non-inline-xattr inodes
In the Linux kernel, the following vulnerability has been resolved:
f2fs: bound iinlinexattrsize for non-inline-xattr inodes
When the flexibleinlinexattr feature is enabled, doreadinode() loads the on-disk iinlinexattrsize unconditionally:
if (f2fssbhasflexibleinlinexattr(sbi)) fi->iinlinexattrsize = le16tocpu(ri->iinlinexattrsize);
but sanitycheckinode() only range-checks it when the inode also has the FIINLINEXATTR flag set. An inode that carries an inline dentry or inline data but not FIINLINEXATTR -- the normal layout for an inline directory -- therefore keeps a fully attacker-controlled iinlinexattrsize from a crafted image.
getinlinexattraddrs() returns that value with no flag gating, so it feeds the inode geometry:
MAXINLINEDATA() = 4 (CURADDRSPERINODE - iinlinexattrsize - 1) NRINLINEDENTRY() = MAXINLINEDATA() BITSPERBYTE / (...) addrsperpage() = CURADDRSPERINODE - iinlinexattrsize
A large iinlinexattrsize drives MAXINLINEDATA() and NRINLINEDENTRY() negative, so makedentryptrinline() sets d->max (int) to a negative value. The inline directory walk then compares an unsigned long bitpos against that negative d->max, which is promoted to a huge unsigned bound, and reads far past the inline area:
while (bitpos < d->max) / fs/f2fs/dir.c / ... testbitle(bitpos, d->bitmap) / d->dentry[bitpos] ...
Mounting a crafted image and reading such a directory triggers an out-of-bounds read in f2fsfilldentries(); the same underflow also corrupts ADDRSPERINODE for regular files.
Validate iinlinexattrsize against MAXINLINEXATTRSIZE whenever the flexibleinlinexattr feature is enabled -- i.e. whenever the value is loaded from disk and consumed -- and keep the lower MININLINEXATTRSIZE bound gated on inodes that actually carry an inline xattr, so legitimate inodes with iinlinexattrsize == 0 are still accepted.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
When the flexible_inline_xattr feature is enabled, ensure the kernel fix is applied so i_inline_xattr_size is properly bounded; otherwise crafted images can cause underflow/overflow in inline directory handling.
f2fs flexible_inline_xattr = enable/allowed only after patch - Configuration
Disable the flexible_inline_xattr feature on vulnerable kernels until the fix that validates i_inline_xattr_size against MAX_INLINE_XATTR_SIZE is applied.
f2fs f2fs_sb_has_flexible_inline_xattr(sbi) / flexible_inline_xattr feature gating = disabled for vulnerable kernels
Event History
Frequently Asked Questions
What is the severity of CVE-2026-63815?
CVE-2026-63815 has a high severity rating of 8.4 according to CVSS 3.1.
What are the impacts of CVE-2026-63815?
CVE-2026-63815 can lead to high confidentiality, integrity, and availability impacts due to improper handling of inline extended attributes.
How do I fix CVE-2026-63815?
To fix CVE-2026-63815, update to the patched version of the Linux kernel that resolves this issue.
Which software is affected by CVE-2026-63815?
CVE-2026-63815 affects the Linux kernel, specifically the F2FS filesystem.
When was CVE-2026-63815 published?
CVE-2026-63815 was published on July 19, 2026.