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.
Published: 2026-07-19
Score: 8.4 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

When the flexible_inline_xattr feature is enabled, the f2fs filesystem loader reads the on‑disk i_inline_xattr_size value without proper validation unless the inode has the FI_INLINE_XATTR flag. An attacker can craft a filesystem image that sets this value to a large number. The resulting calculations produce negative sizes for inline directory metadata, causing the directory walk logic to compare an unsigned long bit position against a negative maximum. This underflow makes the comparison succeed and triggers an out-of-bounds read of kernel memory in f2fs_fill_dentries(), exposing data beyond the intended inline area and corrupting ADDRS_PER_INODE for regular files. The primary impact is an out‑of‑bounds read that can leak kernel memory or corrupt inode metadata, potentially leading to information disclosure or further compromise.

Affected Systems

Any Linux kernel binary that includes the f2fs filesystem and has the flexible_inline_xattr feature enabled is vulnerable. The CNA‐listed vendor/product is Linux:Linux, and because no specific kernel version numbers are supplied, the vulnerability applies to every kernel distribution that ships with f2fs supporting the flexible inline attribute feature. Operating systems that install or compile f2fs with that feature enabled are therefore at risk.

Risk and Exploitability

The CVSS score of 8.4 signals a high severity vulnerability. EPSS less than 1% suggests a low current exploit probability, and the flaw is not listed in CISA's KEV catalog. The attack requires the ability to provide a crafted f2fs image to a system that mounts that filesystem, meaning a local attacker with filesystem mounting privileges, or a privileged process that can initialize an f2fs volume. The exploitation path is local and depends on a mount of a malicious image; denial of service or information disclosure can result from the out‑of‑bounds read of kernel memory.

Generated by OpenCVE AI on July 30, 2026 at 22:13 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the kernel patch that validates i_inline_xattr_size before it is used; the latest f2fs source tree contains the fix.
  • Upgrade to a kernel release that incorporates this patch or any subsequent update that addresses the flaw.
  • If a patch is unavailable, disable the flexible_inline_xattr feature by editing the f2fs configuration or using the mount option to turn it off.
  • Enforce strict access controls for mounting f2fs filesystems, allowing only trusted authenticated users or processes to create or mount f2fs volumes.

Generated by OpenCVE AI on July 30, 2026 at 22:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4717-1 linux security update
Debian DLA Debian DLA DLA-4720-1 linux security update
Debian DLA Debian DLA DLA-4723-1 linux-6.1 security update
Debian DLA Debian DLA DLA-4724-1 linux-6.12 new package
Debian DSA Debian DSA DSA-6393-1 linux security update
History

Fri, 24 Jul 2026 18:30:00 +0000


Tue, 21 Jul 2026 00:15:00 +0000


Mon, 20 Jul 2026 14:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Sun, 19 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
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.
Title f2fs: bound i_inline_xattr_size for non-inline-xattr inodes
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-05T12:36:01.489Z

Reserved: 2026-07-19T07:54:57.014Z

Link: CVE-2026-63815

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

Severity :

Publid Date: 2026-07-19T00:00:00Z

Links: CVE-2026-63815 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T22:15:13Z

Weaknesses