<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-07T17:22:27.124153+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/cve-2024-26960</id>
    <title>CVE-2024-26960 — mm: swap: fix race between free_swap_and_cache() and swapoff()</title>
    <updated>2026-10-07T17:22:27.368304+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Linux, linux_kernel, Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem</p>
<p>In the Linux kernel, the following vulnerability has been resolved:</p>
<p>mm: swap: fix race between free_swap_and_cache() and swapoff()</p>
<p>There was previously a theoretical window where swapoff() could run and
teardown a swap_info_struct while a call to free_swap_and_cache() was
running in another thread.  This could cause, amongst other bad
possibilities, swap_page_trans_huge_swapped() (called by
free_swap_and_cache()) to access the freed memory for swap_map.</p>
<p>This is a theoretical problem and I haven't been able to provoke it from a
test case.  But there has been agreement based on code review that this is
possible (see link below).</p>
<p>Fix it by using get_swap_device()/put_swap_device(), which will stall
swapoff().  There was an extra check in _swap_info_get() to confirm that
the swap entry was not free.  This isn't present in get_swap_device()
because it doesn't make sense in general due to the race between getting
the reference and swapoff.  So I've added an equivalent check directly in
free_swap_and_cache().</p>
<p>Details of how to provoke one possible issue (thanks to David Hildenbrand
for deriving this):</p>
<p>--8&lt;-----</p>
<p>__swap_entry_free() might be the last user and result in
"count == SWAP_HAS_CACHE".</p>
<p>swapoff-&gt;try_to_unuse() will stop as soon as soon as si-&gt;inuse_pages==0.</p>
<p>So the question is: could someone reclaim the folio and turn
si-&gt;inuse_pages==0, before we completed swap_page_trans_huge_swapped().</p>
<p>Imagine the following: 2 MiB folio in the swapcache. Only 2 subpages are
stil…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/cve-2024-26960"/>
  </entry>
</feed>
