[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025090551-CVE-2025-39717-9e8a@gregkh>
Date: Fri, 5 Sep 2025 19:21:30 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2025-39717: open_tree_attr: do not allow id-mapping changes without OPEN_TREE_CLONE
From: Greg Kroah-Hartman <gregkh@...nel.org>
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.
The Linux kernel CVE team has assigned CVE-2025-39717 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.15 with commit 2462651ffa76b87f9c2e4403ef6e6b89b703fb2f and fixed in 6.16.4 with commit 69dbdc711d9130136824e3830191a6afffa0a1f0
Issue introduced in 6.15 with commit 2462651ffa76b87f9c2e4403ef6e6b89b703fb2f and fixed in 6.17-rc3 with commit 9308366f062129d52e0ee3f7a019f7dd41db33df
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-39717
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/namespace.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/69dbdc711d9130136824e3830191a6afffa0a1f0
https://git.kernel.org/stable/c/9308366f062129d52e0ee3f7a019f7dd41db33df
Powered by blists - more mailing lists