<?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://vulnerability.circl.lu</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>Wed, 07 Oct 2026 12:50:42 +0000</lastBuildDate>
    <item>
      <title>CVE-2022-49049 — mm/secretmem: fix panic when growing a memfd_secret</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2022-49049</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;mm/secretmem: fix panic when growing a memfd_secret&lt;/p&gt;
&lt;p&gt;When one tries to grow an existing memfd_secret with ftruncate, one gets
a panic [1].  For example, doing the following reliably induces the
panic:&lt;/p&gt;
&lt;p&gt;fd = memfd_secret();&lt;/p&gt;
&lt;p&gt;ftruncate(fd, 10);
    ptr = mmap(NULL, 10, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
    strcpy(ptr, &amp;#34;123456789&amp;#34;);&lt;/p&gt;
&lt;p&gt;munmap(ptr, 10);
    ftruncate(fd, 20);&lt;/p&gt;
&lt;p&gt;The basic reason for this is, when we grow with ftruncate, we call down
into simple_setattr, and then truncate_inode_pages_range, and eventually
we try to zero part of the memory.  The normal truncation code does this
via the direct map (i.e., it calls page_address() and hands that to
memset()).&lt;/p&gt;
&lt;p&gt;For memfd_secret though, we specifically don&amp;#39;t map our pages via the
direct map (i.e.  we call set_direct_map_invalid_noflush() on every
fault).  So the address returned by page_address() isn&amp;#39;t useful, and
when we try to memset() with it we panic.&lt;/p&gt;
&lt;p&gt;This patch avoids the panic by implementing a custom setattr for
memfd_secret, which detects resizes specifically (setting the size for
the first time works just fine, since there are no existing pages to try
to zero), and rejects them with EINVAL.&lt;/p&gt;
&lt;p&gt;One could argue growing should be supported, but I think that will
require a significantly more lengthy change.  So, I propose a minimal
fix for the benefit of stable kernels, and then perhaps to extend
memfd_secret to support growing in…&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;mm/secretmem: fix panic when growing a memfd_secret&lt;/p&gt;
&lt;p&gt;When one tries to grow an existing memfd_secret with ftruncate, one gets
a panic [1].  For example, doing the following reliably induces the
panic:&lt;/p&gt;
&lt;p&gt;fd = memfd_secret();&lt;/p&gt;
&lt;p&gt;ftruncate(fd, 10);
    ptr = mmap(NULL, 10, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
    strcpy(ptr, &amp;#34;123456789&amp;#34;);&lt;/p&gt;
&lt;p&gt;munmap(ptr, 10);
    ftruncate(fd, 20);&lt;/p&gt;
&lt;p&gt;The basic reason for this is, when we grow with ftruncate, we call down
into simple_setattr, and then truncate_inode_pages_range, and eventually
we try to zero part of the memory.  The normal truncation code does this
via the direct map (i.e., it calls page_address() and hands that to
memset()).&lt;/p&gt;
&lt;p&gt;For memfd_secret though, we specifically don&amp;#39;t map our pages via the
direct map (i.e.  we call set_direct_map_invalid_noflush() on every
fault).  So the address returned by page_address() isn&amp;#39;t useful, and
when we try to memset() with it we panic.&lt;/p&gt;
&lt;p&gt;This patch avoids the panic by implementing a custom setattr for
memfd_secret, which detects resizes specifically (setting the size for
the first time works just fine, since there are no existing pages to try
to zero), and rejects them with EINVAL.&lt;/p&gt;
&lt;p&gt;One could argue growing should be supported, but I think that will
require a significantly more lengthy change.  So, I propose a minimal
fix for the benefit of stable kernels, and then perhaps to extend
memfd_secret to support growing in…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2022-49049</guid>
    </item>
  </channel>
</rss>
