Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2025-39717

published high CVSS 3.1 · 7.8

open_tree_attr: do not allow id-mapping changes without OPEN_TREE_CLONE

Published
05 Sep 2025, 17:21:24 UTC
Updated
05 Aug 2026, 12:04:48 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux2462651ffa76b87f9c2e4403ef6e6b89b703fb2f to < 69dbdc711d9130136824e3830191a6afffa0a1f0 · 2462651ffa76b87f9c2e4403ef6e6b89b703fb2f to < 9308366f062129d52e0ee3f7a019f7dd41db33df · Other versions: unaffected Affected Not stated Linux
Linux — Linux6.15 (affected) · 0 to < 6.15 (unaffected · semver) · 6.16.4 through 6.16.* (unaffected · semver) · 6.17 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment

Description

In the Linux kernel, the following vulnerability has been resolved: open_tree_attr: do not allow id-mapping changes without OPEN_TREE_CLONE As described in commit 7a54947e727b ('Merge patch series "fs: allow changing idmappings"'), open_tree_attr(2) was necessary in order to allow for a detached mount to be created and have its idmappings changed without the risk of any racing threads operating on it. For this reason, mount_setattr(2) still does not allow for id-mappings to be changed. However, there was a bug in commit 2462651ffa76 ("fs: allow changing idmappings") which allowed users to bypass this restriction by calling open_tree_attr(2) *without* OPEN_TREE_CLONE. can_idmap_mount() prevented this bug from allowing an attached mountpoint's id-mapping from being modified (thanks to an is_anon_ns() check), but this still allows for detached (but visible) mounts to have their be id-mapping changed. This risks the same UAF and locking issues as described in the merge commit, and was likely unintentional.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The vulnerability is reached purely through local syscalls — `open_tree(2)` to create a detached mount and `open_tree_attr(2)` to replace its idmapping. There is no remote or adjacent-network path to fs/namespace.c mount attribute handling. AC:L - The attacker controls both sides of the race entirely: one thread calls `open_tree_attr()` to free the old `struct mnt_idmap` while attacker-spawned threads hammer `openat()`/`statx()`/`open_tree(OPEN_TREE_CLONE)` on the same detached-mount fd, and the replace can be repeated in a loop with a heap spray of the kmalloc-cg-192 slab. PR:L - Only an unprivileged local user is required — `unshare -Urm` grants CAP_SYS_ADMIN over both the new mount namespace (satisfying `may_mount()`) and over the superblock's `s_user_ns` (satisfying `can_idmap_mount()`) for a self-mounted tmpfs or fuse filesystem, both of which carry `FS_USERNS_MOUNT | FS_ALLOW_IDMAP`. UI:N - The attacker performs every step — creating the detached mount, applying the first idmapping, and racing the replacement — within its own processes. No victim action of any kind is needed. S:U - The freed object and all corrupted state live in the kernel's own memory; the impact is confined to the kernel security authority with no crossing of a VM, IOMMU, or hypervisor boundary. C:H - This is a use-after-free on a heap object whose contents directly determine mapped uid/gid values, so refilling the freed slot lets the attacker forge `uid_gid_map.forward` into an arbitrary kernel pointer that `bsearch()` dereferences, with the result observable via `stat()` — an arbitrary kernel memory read. I:H - `clone_mnt()`'s `mnt_idmap_get()` performs a `refcount_inc()` on the freed object, giving a write primitive into reclaimed heap memory, and the stale/forged idmapping also causes ownership and permission decisions to be made from attacker-influenced data. A:H - Dereferencing the freed `struct mnt_idmap` and its `kfree()`d extent arrays, plus refcount underflow and double-free on repeated replacement, reliably produce an oops or panic taking down the whole system.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 2462651ffa76b87f9c2e4403ef6e6b89b703fb2f to < 69dbdc711d9130136824e3830191a6afffa0a1f0 (affected · git)2462651ffa76b87f9c2e4403ef6e6b89b703fb2f to < 9308366f062129d52e0ee3f7a019f7dd41db33df (affected · git)Default: unaffected Linux · cna
Linux Linux 6.15 (affected)0 to < 6.15 (unaffected · semver)6.16.4 through 6.16.* (unaffected · semver)6.17 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

2

Provider assertions

1

Linux · cna

open_tree_attr: do not allow id-mapping changes without OPEN_TREE_CLONE

Provenance

Schema
5.2
Searchable
yes
Content hash
4965254c3d37adac74cb0171a276f2b7d372ca76600c582880ad50067e34eb80
Ingested
23 Sep 2026, 08:47:06 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected