<?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 02:34:08 +0000</lastBuildDate>
    <item>
      <title>CVE-2024-42239 — bpf: Fail bpf_timer_cancel when callback is being cancelled</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2024-42239</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: Fail bpf_timer_cancel when callback is being cancelled&lt;/p&gt;
&lt;p&gt;Given a schedule:&lt;/p&gt;
&lt;p&gt;timer1 cb			timer2 cb&lt;/p&gt;
&lt;p&gt;bpf_timer_cancel(timer2);	bpf_timer_cancel(timer1);&lt;/p&gt;
&lt;p&gt;Both bpf_timer_cancel calls would wait for the other callback to finish
executing, introducing a lockup.&lt;/p&gt;
&lt;p&gt;Add an atomic_t count named &amp;#39;cancelling&amp;#39; in bpf_hrtimer. This keeps
track of all in-flight cancellation requests for a given BPF timer.
Whenever cancelling a BPF timer, we must check if we have outstanding
cancellation requests, and if so, we must fail the operation with an
error (-EDEADLK) since cancellation is synchronous and waits for the
callback to finish executing. This implies that we can enter a deadlock
situation involving two or more timer callbacks executing in parallel
and attempting to cancel one another.&lt;/p&gt;
&lt;p&gt;Note that we avoid incrementing the cancelling counter for the target
timer (the one being cancelled) if bpf_timer_cancel is not invoked from
a callback, to avoid spurious errors. The whole point of detecting
cur-&amp;gt;cancelling and returning -EDEADLK is to not enter a busy wait loop
(which may or may not lead to a lockup). This does not apply in case the
caller is in a non-callback context, the other side can continue to
cancel as it sees fit without running into errors.&lt;/p&gt;
&lt;p&gt;Background on prior attempts:&lt;/p&gt;
&lt;p&gt;Earlier versions of this patch used a bool &amp;#39;cancelling&amp;#39; bit and used the
following pattern under timer-&amp;gt;lock to publish cancellation statu…&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: Fail bpf_timer_cancel when callback is being cancelled&lt;/p&gt;
&lt;p&gt;Given a schedule:&lt;/p&gt;
&lt;p&gt;timer1 cb			timer2 cb&lt;/p&gt;
&lt;p&gt;bpf_timer_cancel(timer2);	bpf_timer_cancel(timer1);&lt;/p&gt;
&lt;p&gt;Both bpf_timer_cancel calls would wait for the other callback to finish
executing, introducing a lockup.&lt;/p&gt;
&lt;p&gt;Add an atomic_t count named &amp;#39;cancelling&amp;#39; in bpf_hrtimer. This keeps
track of all in-flight cancellation requests for a given BPF timer.
Whenever cancelling a BPF timer, we must check if we have outstanding
cancellation requests, and if so, we must fail the operation with an
error (-EDEADLK) since cancellation is synchronous and waits for the
callback to finish executing. This implies that we can enter a deadlock
situation involving two or more timer callbacks executing in parallel
and attempting to cancel one another.&lt;/p&gt;
&lt;p&gt;Note that we avoid incrementing the cancelling counter for the target
timer (the one being cancelled) if bpf_timer_cancel is not invoked from
a callback, to avoid spurious errors. The whole point of detecting
cur-&amp;gt;cancelling and returning -EDEADLK is to not enter a busy wait loop
(which may or may not lead to a lockup). This does not apply in case the
caller is in a non-callback context, the other side can continue to
cancel as it sees fit without running into errors.&lt;/p&gt;
&lt;p&gt;Background on prior attempts:&lt;/p&gt;
&lt;p&gt;Earlier versions of this patch used a bool &amp;#39;cancelling&amp;#39; bit and used the
following pattern under timer-&amp;gt;lock to publish cancellation statu…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2024-42239</guid>
    </item>
  </channel>
</rss>
