<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://db.gcve.eu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Fri, 04 Dec 2026 19:18:40 +0000</lastBuildDate>
    <item>
      <title>CVE-2026-139215 — nsproxy: Fix cred leak in the error path of prepare_nsset()</title>
      <link>https://db.gcve.eu/vuln/cve-2026-139215</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;nsproxy: Fix cred leak in the error path of prepare_nsset()&lt;/p&gt;
&lt;p&gt;A task that calls setns() with CLONE_NEWUSER together with CLONE_NEWNS
and at least one more namespace flag leaks a struct cred (and the
user_namespace, ucounts and group_info references it holds) whenever the
call fails at the fs_struct copy.  On a kernel with CONFIG_USER_NS the
leak is one cred per failed setns(); under memory pressure, or driven by
a fault-injecting attacker, it accumulates and pins user namespaces that
can then never be freed.&lt;/p&gt;
&lt;p&gt;prepare_nsset() sets nsset-&amp;gt;flags only on the success path:&lt;/p&gt;
&lt;p&gt;if (flags &amp;amp; CLONE_NEWUSER)
		nsset-&amp;gt;cred = prepare_creds();
	...
	} else if (flags &amp;amp; CLONE_NEWNS) {
		nsset-&amp;gt;fs = copy_fs_struct(me-&amp;gt;fs);
		if (!nsset-&amp;gt;fs)
			goto out;	/* flags still 0 here */
	}
	nsset-&amp;gt;flags = flags;
	return 0;
out:
	put_nsset(nsset);&lt;/p&gt;
&lt;p&gt;put_nsset() decides what to release from nsset-&amp;gt;flags:&lt;/p&gt;
&lt;p&gt;if (flags &amp;amp; CLONE_NEWUSER)
		put_cred(nsset_cred(nsset));&lt;/p&gt;
&lt;p&gt;On the copy_fs_struct() failure arm prepare_creds() has already
allocated the cred, but nsset-&amp;gt;flags is still the zero from the caller&amp;#39;s
&amp;#34;struct nsset nsset = {}&amp;#34;, so put_nsset() does not see CLONE_NEWUSER and
never drops it.  The caller (__do_sys_setns) returns the error without
touching nsset, so the cred is lost.&lt;/p&gt;
&lt;p&gt;Set nsset-&amp;gt;flags at the start of prepare_nsset(), before anything can
fail, so every error exit through put_nsset() releases what was taken.
commit_nsset(), which…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;nsproxy: Fix cred leak in the error path of prepare_nsset()&lt;/p&gt;
&lt;p&gt;A task that calls setns() with CLONE_NEWUSER together with CLONE_NEWNS
and at least one more namespace flag leaks a struct cred (and the
user_namespace, ucounts and group_info references it holds) whenever the
call fails at the fs_struct copy.  On a kernel with CONFIG_USER_NS the
leak is one cred per failed setns(); under memory pressure, or driven by
a fault-injecting attacker, it accumulates and pins user namespaces that
can then never be freed.&lt;/p&gt;
&lt;p&gt;prepare_nsset() sets nsset-&amp;gt;flags only on the success path:&lt;/p&gt;
&lt;p&gt;if (flags &amp;amp; CLONE_NEWUSER)
		nsset-&amp;gt;cred = prepare_creds();
	...
	} else if (flags &amp;amp; CLONE_NEWNS) {
		nsset-&amp;gt;fs = copy_fs_struct(me-&amp;gt;fs);
		if (!nsset-&amp;gt;fs)
			goto out;	/* flags still 0 here */
	}
	nsset-&amp;gt;flags = flags;
	return 0;
out:
	put_nsset(nsset);&lt;/p&gt;
&lt;p&gt;put_nsset() decides what to release from nsset-&amp;gt;flags:&lt;/p&gt;
&lt;p&gt;if (flags &amp;amp; CLONE_NEWUSER)
		put_cred(nsset_cred(nsset));&lt;/p&gt;
&lt;p&gt;On the copy_fs_struct() failure arm prepare_creds() has already
allocated the cred, but nsset-&amp;gt;flags is still the zero from the caller&amp;#39;s
&amp;#34;struct nsset nsset = {}&amp;#34;, so put_nsset() does not see CLONE_NEWUSER and
never drops it.  The caller (__do_sys_setns) returns the error without
touching nsset, so the cred is lost.&lt;/p&gt;
&lt;p&gt;Set nsset-&amp;gt;flags at the start of prepare_nsset(), before anything can
fail, so every error exit through put_nsset() releases what was taken.
commit_nsset(), which…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/cve-2026-139215</guid>
    </item>
  </channel>
</rss>
