Description
In the Linux kernel, the following vulnerability has been resolved:

fs: refuse O_TMPFILE creation with an unmapped fsuid or fsgid

vfs_tmpfile() never checked that the caller's fsuid and fsgid map into
the filesystem. On an idmapped mount whose idmapping does not cover the
caller's fs{u,g}id, the ->tmpfile() instance initializes the new inode
through inode_init_owner(), where mapped_fsuid()/mapped_fsgid() return
INVALID_UID/INVALID_GID, and the tmpfile ends up owned by (uid_t)-1.

Every other creation path already refuses this: may_o_create() (O_CREAT)
and may_create_dentry() (mkdir, mknod, symlink, link) bail out with
-EOVERFLOW via fsuidgid_has_mapping() precisely so that an object cannot
be created with an owner the filesystem cannot represent. An O_TMPFILE
is no exception: it is created I_LINKABLE and linkat(2) can splice it
into the namespace afterwards, so the same guarantee must hold.

Add the missing fsuidgid_has_mapping() check to vfs_tmpfile(). On a
non-idmapped mount the caller's fs{u,g}id always map in the superblock's
user namespace, so this is a no-op there and only takes effect on an
idmapped mount that does not map the caller. It applies to every
filesystem that sets FS_ALLOW_IDMAP and implements ->tmpfile() (tmpfs,
ext4, btrfs, xfs, f2fs, ...), and to overlayfs, whose upper-layer
tmpfile creation funnels through vfs_tmpfile() via backing_tmpfile_open().
Published: 2026-08-15
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The kernel function vfs_tmpfile() mistakenly allowed a process to create an O_TMPFILE on an idmapped filesystem where its filesystem user or group ID is not mapped. The created temporary inode is initialized with an owner of (uid_t)-1, a value that the filesystem cannot represent. When the file is later linked into the namespace with linkat(2), the resulting file has an unmapped or invalid owner, which can be used by an attacker to fake ownership or bypass security checks that rely on standard ownership semantics.

Affected Systems

All Linux kernel releases prior to the inclusion of the missing mapping check in vfs_tmpfile() are affected. This flaw touches every filesystem that supports tmpfile creation through the FS_ALLOW_IDMAP flag, such as tmpfs, ext4, btrfs, xfs, f2fs, and overlayfs, on mounts configured for ID mapping where the current process’s fsuid or fsgid is not covered by the mapping.

Risk and Exploitability

The vulnerability is exploitable locally by any user who can create an O_TMPFILE on an idmapped filesystem with an unmapped fsuid or fsgid. An attacker can produce a file whose apparent owner is an unmapped user, potentially allowing them to defeat ownership‑based access controls or manipulate data integrity. No public exploit is known, the EPSS score is <1%, and the vulnerability is not listed in the CISA KEV catalog. The CVSS score of 5.5 indicates moderate severity.

Generated by OpenCVE AI on August 18, 2026 at 14:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Install a Linux kernel update that incorporates the missing fsuidgid_has_mapping check in vfs_tmpfile()
  • If an upgrade is not yet possible, avoid using O_TMPFILE on idmapped filesystems; instead, create files with explicit ownership checks such as O_CREAT or traditional mknod
  • Ensure that the filesystem’s ID mapping configuration covers all active process fsuid and fsgid values, or disable idmapping on filesystems where it is not needed

Generated by OpenCVE AI on August 18, 2026 at 14:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 18 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-708
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate


Sat, 15 Aug 2026 18:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-640
CWE-759

Sat, 15 Aug 2026 06:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: fs: refuse O_TMPFILE creation with an unmapped fsuid or fsgid vfs_tmpfile() never checked that the caller's fsuid and fsgid map into the filesystem. On an idmapped mount whose idmapping does not cover the caller's fs{u,g}id, the ->tmpfile() instance initializes the new inode through inode_init_owner(), where mapped_fsuid()/mapped_fsgid() return INVALID_UID/INVALID_GID, and the tmpfile ends up owned by (uid_t)-1. Every other creation path already refuses this: may_o_create() (O_CREAT) and may_create_dentry() (mkdir, mknod, symlink, link) bail out with -EOVERFLOW via fsuidgid_has_mapping() precisely so that an object cannot be created with an owner the filesystem cannot represent. An O_TMPFILE is no exception: it is created I_LINKABLE and linkat(2) can splice it into the namespace afterwards, so the same guarantee must hold. Add the missing fsuidgid_has_mapping() check to vfs_tmpfile(). On a non-idmapped mount the caller's fs{u,g}id always map in the superblock's user namespace, so this is a no-op there and only takes effect on an idmapped mount that does not map the caller. It applies to every filesystem that sets FS_ALLOW_IDMAP and implements ->tmpfile() (tmpfs, ext4, btrfs, xfs, f2fs, ...), and to overlayfs, whose upper-layer tmpfile creation funnels through vfs_tmpfile() via backing_tmpfile_open().
Title fs: refuse O_TMPFILE creation with an unmapped fsuid or fsgid
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-17T05:13:31.893Z

Reserved: 2026-08-09T03:40:39.922Z

Link: CVE-2026-72379

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-15T06:22:11.387

Modified: 2026-08-17T06:18:42.283

Link: CVE-2026-72379

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-15T00:00:00Z

Links: CVE-2026-72379 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-18T14:30:05Z

Weaknesses
  • CWE-640

    Weak Password Recovery Mechanism for Forgotten Password

  • CWE-708

    Incorrect Ownership Assignment

  • CWE-759

    Use of a One-Way Hash without a Salt