{"id":"CVE-2025-39717","aliases":["CVE-2025-39717"],"related":[],"kind":"vulnerability","state":"published","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:\n\nopen_tree_attr: do not allow id-mapping changes without OPEN_TREE_CLONE\n\nAs described in commit 7a54947e727b ('Merge patch series \"fs: allow\nchanging idmappings\"'), open_tree_attr(2) was necessary in order to\nallow for a detached mount to be created and have its idmappings changed\nwithout the risk of any racing threads operating on it. For this reason,\nmount_setattr(2) still does not allow for id-mappings to be changed.\n\nHowever, there was a bug in commit 2462651ffa76 (\"fs: allow changing\nidmappings\") which allowed users to bypass this restriction by calling\nopen_tree_attr(2) *without* OPEN_TREE_CLONE.\n\ncan_idmap_mount() prevented this bug from allowing an attached\nmountpoint's id-mapping from being modified (thanks to an is_anon_ns()\ncheck), but this still allows for detached (but visible) mounts to have\ntheir be id-mapping changed. This risks the same UAF and locking issues\nas described in the merge commit, and was likely unintentional.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nopen_tree_attr: do not allow id-mapping changes without OPEN_TREE_CLONE\n\nAs described in commit 7a54947e727b ('Merge patch series \"fs: allow\nchanging idmappings\"'), open_tree_attr(2) was necessary in order to\nallow for a detached mount to be created and have its idmappings changed\nwithout the risk of any racing threads operating on it. For this reason,\nmount_setattr(2) still does not allow for id-mappings to be changed.\n\nHowever, there was a bug in commit 2462651ffa76 (\"fs: allow changing\nidmappings\") which allowed users to bypass this restriction by calling\nopen_tree_attr(2) *without* OPEN_TREE_CLONE.\n\ncan_idmap_mount() prevented this bug from allowing an attached\nmountpoint's id-mapping from being modified (thanks to an is_anon_ns()\ncheck), but this still allows for detached (but visible) mounts to have\ntheir be id-mapping changed. This risks the same UAF and locking issues\nas described in the merge commit, and was likely unintentional.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nopen_tree_attr: no permitir cambios de id-mapping sin OPEN_TREE_CLONE\n\nComo se describe en el commit 7a54947e727b ('Fusionar serie de parches “fs: permitir cambiar idmappings”'), open_tree_attr(2) era necesario para permitir que se creara un montaje desasociado y que sus idmappings fueran cambiados sin el riesgo de que ningún hilo en competencia operara sobre él. Por esta razón, mount_setattr(2) todavía no permite que los id-mappings sean cambiados.\n\nSin embargo, había un error en el commit 2462651ffa76 ('fs: permitir cambiar idmappings') que permitía a los usuarios eludir esta restricción llamando a open_tree_attr(2) *sin* OPEN_TREE_CLONE.\n\ncan_idmap_mount() impidió que este error permitiera que el id-mapping de un punto de montaje adjunto fuera modificado (gracias a una comprobación de is_anon_ns()), pero esto todavía permite que los montajes desasociados (pero visibles) tengan su id-mapping cambiado. Esto arriesga los mismos problemas de UAF y de bloqueo como se describe en el commit de fusión, y probablemente fue involuntario.","source":"nvd"}],"published":"2025-09-05T17:21:24.528Z","modified":"2026-10-19T21:10:00.160Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"2462651ffa76b87f9c2e4403ef6e6b89b703fb2f","fixed":"69dbdc711d9130136824e3830191a6afffa0a1f0","status":"affected"},{"type":"git","introduced":"2462651ffa76b87f9c2e4403ef6e6b89b703fb2f","fixed":"9308366f062129d52e0ee3f7a019f7dd41db33df","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.15","status":"unaffected"},{"type":"semver","introduced":"6.16.4","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.15","fixed":"6.16.4"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/69dbdc711d9130136824e3830191a6afffa0a1f0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9308366f062129d52e0ee3f7a019f7dd41db33df","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-39717","url":"https://www.cve.org/CVERecord?id=CVE-2025-39717","licence":"CVE Terms of Use","modified":"2026-08-05T12:04:48.428Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-39717","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39717","licence":"Public domain","modified":"2026-10-19T21:10:00.160Z"}],"updatedAt":"2026-11-25T22:59:04.279Z","epss":{"score":0.00165,"percentile":0.05923,"date":"2026-12-01T12:00:22.000Z"}}