<?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:49:19 +0000</lastBuildDate>
    <item>
      <title>CVE-2026-139325 — bpf: Forbid sleeping in hash map for_each callbacks</title>
      <link>https://db.gcve.eu/vuln/cve-2026-139325</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;bpf: Forbid sleeping in hash map for_each callbacks&lt;/p&gt;
&lt;p&gt;A sleepable program (e.g. SEC(&amp;#34;syscall&amp;#34;), lsm.s, fentry.s) can pass a
callback to bpf_for_each_map_elem() on a hash map and call a sleepable
helper or kfunc such as bpf_copy_from_user() from it. The verifier
accepts this, but at run time the callback is invoked from inside an RCU
read-side critical section:&lt;/p&gt;
&lt;p&gt;bpf_for_each_hash_elem()
      rcu_read_lock();
      callback_fn(map, key, val, ctx, 0);
        bpf_copy_from_user()       &amp;lt;- may fault and sleep
      rcu_read_unlock();&lt;/p&gt;
&lt;p&gt;bpf_each_rhash_elem() does the same for BPF_MAP_TYPE_RHASH. Sleeping
there triggers the &amp;#34;Voluntary context switch within RCU read-side
critical section!&amp;#34; warning, delays grace periods, and with
CONFIG_PREEMPT_RCU=n silently ends the read-side critical section that
the bucket walk relies on.&lt;/p&gt;
&lt;p&gt;Synchronous callbacks are verified with the caller&amp;#39;s state, so
kernel/bpf/verifier.c:in_sleepable_context() only looks at the program&amp;#39;s
sleepability and the locks the program took itself, and does not know
that the helper holds rcu_read_lock() around the callback.&lt;/p&gt;
&lt;p&gt;With a SEC(&amp;#34;syscall&amp;#34;) program whose callback reads a page that has to be
read from disk first:&lt;/p&gt;
&lt;p&gt;BUG: sleeping function called from invalid context at include/linux/uaccess.h:169
  RCU nest depth: 1, expected: 0
   __might_fault+0x29/0x80
   _copy_from_user+0x26/0x90
   bpf_copy_from_user+0x23/0x60
   bpf_prog_17d44fa39eebd6cc_…&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;bpf: Forbid sleeping in hash map for_each callbacks&lt;/p&gt;
&lt;p&gt;A sleepable program (e.g. SEC(&amp;#34;syscall&amp;#34;), lsm.s, fentry.s) can pass a
callback to bpf_for_each_map_elem() on a hash map and call a sleepable
helper or kfunc such as bpf_copy_from_user() from it. The verifier
accepts this, but at run time the callback is invoked from inside an RCU
read-side critical section:&lt;/p&gt;
&lt;p&gt;bpf_for_each_hash_elem()
      rcu_read_lock();
      callback_fn(map, key, val, ctx, 0);
        bpf_copy_from_user()       &amp;lt;- may fault and sleep
      rcu_read_unlock();&lt;/p&gt;
&lt;p&gt;bpf_each_rhash_elem() does the same for BPF_MAP_TYPE_RHASH. Sleeping
there triggers the &amp;#34;Voluntary context switch within RCU read-side
critical section!&amp;#34; warning, delays grace periods, and with
CONFIG_PREEMPT_RCU=n silently ends the read-side critical section that
the bucket walk relies on.&lt;/p&gt;
&lt;p&gt;Synchronous callbacks are verified with the caller&amp;#39;s state, so
kernel/bpf/verifier.c:in_sleepable_context() only looks at the program&amp;#39;s
sleepability and the locks the program took itself, and does not know
that the helper holds rcu_read_lock() around the callback.&lt;/p&gt;
&lt;p&gt;With a SEC(&amp;#34;syscall&amp;#34;) program whose callback reads a page that has to be
read from disk first:&lt;/p&gt;
&lt;p&gt;BUG: sleeping function called from invalid context at include/linux/uaccess.h:169
  RCU nest depth: 1, expected: 0
   __might_fault+0x29/0x80
   _copy_from_user+0x26/0x90
   bpf_copy_from_user+0x23/0x60
   bpf_prog_17d44fa39eebd6cc_…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/cve-2026-139325</guid>
    </item>
  </channel>
</rss>
