Skip to content
Heist/ feed
Back to feed
HighFix available

open_tree_attr: do not allow id-mapping changes without OPEN_TREE_CLONE

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.16.4
CVEs
CVE-2025-39717
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 02:42 UTC · Revision 1

Source evidence

open_tree_attr: do not allow id-mapping changes without OPEN_TREE_CLONE

core-osv · Original source

Published 5 Sept 2025, 17:21 UTC

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.

osv:CVE-2025-39717

Kernel

Fixed versions: 6.16.4

Complete source record
{
  "id": "b9825e9d42056b2209b7c370d04ee83e8c1de746546d23d702784884ecf047da",
  "url": "https://osv.dev/vulnerability/CVE-2025-39717",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "open_tree_attr: do not allow id-mapping changes without OPEN_TREE_CLONE",
    "summary": "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.",
    "evidence": "osv:CVE-2025-39717",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.16.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-39717",
      "aliases": [
        "CVE-2025-39717"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "2462651ffa76b87f9c2e4403ef6e6b89b703fb2f"
                },
                {
                  "fixed": "69dbdc711d9130136824e3830191a6afffa0a1f0"
                },
                {
                  "fixed": "9308366f062129d52e0ee3f7a019f7dd41db33df"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39717.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.15.0"
                },
                {
                  "fixed": "6.16.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39717.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:52.987645738Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/69dbdc711d9130136824e3830191a6afffa0a1f0",
        "https://git.kernel.org/stable/c/9308366f062129d52e0ee3f7a019f7dd41db33df",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39717.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-39717",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39717.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-39717",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 521888,
  "published_at": "2025-09-05T17:21:24.528+00:00"
}