<?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>Tue, 29 Sep 2026 15:16:59 +0000</lastBuildDate>
    <item>
      <title>CVE-2025-21984 — mm: fix kernel BUG when userfaultfd_move encounters swapcache</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2025-21984</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: fix kernel BUG when userfaultfd_move encounters swapcache&lt;/p&gt;
&lt;p&gt;userfaultfd_move() checks whether the PTE entry is present or a
swap entry.&lt;/p&gt;
&lt;p&gt;- If the PTE entry is present, move_present_pte() handles folio
  migration by setting:&lt;/p&gt;
&lt;p&gt;src_folio-&amp;gt;index = linear_page_index(dst_vma, dst_addr);&lt;/p&gt;
&lt;p&gt;- If the PTE entry is a swap entry, move_swap_pte() simply copies
  the PTE to the new dst_addr.&lt;/p&gt;
&lt;p&gt;This approach is incorrect because, even if the PTE is a swap entry,
it can still reference a folio that remains in the swap cache.&lt;/p&gt;
&lt;p&gt;This creates a race window between steps 2 and 4.
 1. add_to_swap: The folio is added to the swapcache.
 2. try_to_unmap: PTEs are converted to swap entries.
 3. pageout: The folio is written back.
 4. Swapcache is cleared.
If userfaultfd_move() occurs in the window between steps 2 and 4,
after the swap PTE has been moved to the destination, accessing the
destination triggers do_swap_page(), which may locate the folio in
the swapcache. However, since the folio&amp;#39;s index has not been updated
to match the destination VMA, do_swap_page() will detect a mismatch.&lt;/p&gt;
&lt;p&gt;This can result in two critical issues depending on the system
configuration.&lt;/p&gt;
&lt;p&gt;If KSM is disabled, both small and large folios can trigger a BUG
during the add_rmap operation due to:&lt;/p&gt;
&lt;p&gt;page_pgoff(folio, page) != linear_page_index(vma, address)&lt;/p&gt;
&lt;p&gt;[   13.336953] page: refcount:6 mapcount:1 mapping:00000000f43db19c index:0xffffaf150 pfn:0x4667c
[…&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: fix kernel BUG when userfaultfd_move encounters swapcache&lt;/p&gt;
&lt;p&gt;userfaultfd_move() checks whether the PTE entry is present or a
swap entry.&lt;/p&gt;
&lt;p&gt;- If the PTE entry is present, move_present_pte() handles folio
  migration by setting:&lt;/p&gt;
&lt;p&gt;src_folio-&amp;gt;index = linear_page_index(dst_vma, dst_addr);&lt;/p&gt;
&lt;p&gt;- If the PTE entry is a swap entry, move_swap_pte() simply copies
  the PTE to the new dst_addr.&lt;/p&gt;
&lt;p&gt;This approach is incorrect because, even if the PTE is a swap entry,
it can still reference a folio that remains in the swap cache.&lt;/p&gt;
&lt;p&gt;This creates a race window between steps 2 and 4.
 1. add_to_swap: The folio is added to the swapcache.
 2. try_to_unmap: PTEs are converted to swap entries.
 3. pageout: The folio is written back.
 4. Swapcache is cleared.
If userfaultfd_move() occurs in the window between steps 2 and 4,
after the swap PTE has been moved to the destination, accessing the
destination triggers do_swap_page(), which may locate the folio in
the swapcache. However, since the folio&amp;#39;s index has not been updated
to match the destination VMA, do_swap_page() will detect a mismatch.&lt;/p&gt;
&lt;p&gt;This can result in two critical issues depending on the system
configuration.&lt;/p&gt;
&lt;p&gt;If KSM is disabled, both small and large folios can trigger a BUG
during the add_rmap operation due to:&lt;/p&gt;
&lt;p&gt;page_pgoff(folio, page) != linear_page_index(vma, address)&lt;/p&gt;
&lt;p&gt;[   13.336953] page: refcount:6 mapcount:1 mapping:00000000f43db19c index:0xffffaf150 pfn:0x4667c
[…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2025-21984</guid>
    </item>
  </channel>
</rss>
