<?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>Sun, 01 Nov 2026 22:03:24 +0000</lastBuildDate>
    <item>
      <title>CVE-2026-98647 — bpf: Fix divide-by-zero in btf_struct_walk()</title>
      <link>https://db.gcve.eu/vuln/cve-2026-98647</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: Fix divide-by-zero in btf_struct_walk()&lt;/p&gt;
&lt;p&gt;When an access goes past the struct and the last member is a flexible
array, btf_struct_walk() folds the offset back into a single element with
(off - moff) % t-&amp;gt;size, but never checks that the element type has a size.&lt;/p&gt;
&lt;p&gt;BTF takes an empty struct, so this in program BTF&lt;/p&gt;
&lt;p&gt;/* event could be empty */
	struct event {
 #ifdef HAVE_TIMESTAMP
		__u64 ts;
 #endif
	};&lt;/p&gt;
&lt;p&gt;struct batch {
		int nr;
		struct event events[];
	};&lt;/p&gt;
&lt;p&gt;divides by zero at prog load time. Getting there needs a PTR_TO_BTF_ID that
is not MEM_ALLOC, e.g. a plain read of a local kptr stashed in a map from a
sleepable program.&lt;/p&gt;
&lt;p&gt;Oops: divide error: 0000 [#1] SMP KASAN PTI
RIP: 0010:btf_struct_walk+0x53f/0x1570
Call Trace:
 &amp;lt;TASK&amp;gt;
 btf_struct_access+0x42a/0xcd0
 check_ptr_to_btf_access+0x4dc/0x1160
 check_mem_access+0x3a45/0x8740
 check_load_mem+0x36a/0xd10
 do_check_common+0x3ef0/0xb210
 bpf_check+0x6d3b/0x8580
 bpf_prog_load+0xf7c/0x2720
 __sys_bpf+0xa83/0x3690
 __x64_sys_bpf+0xc7/0x150
 x64_sys_call+0x1f3f/0x27e0
 do_syscall_64+0xe5/0x610
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
 &amp;lt;/TASK&amp;gt;&lt;/p&gt;
&lt;p&gt;Reject a zero-sized element type. The fixed array path in the same function
already bails out on the same thing:&lt;/p&gt;
&lt;p&gt;btf_struct_walk()
	...
		/* skip empty array */
		if (moff == mtrue_end)
			continue;&lt;/p&gt;
&lt;p&gt;msize /= total_nelems;&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: Fix divide-by-zero in btf_struct_walk()&lt;/p&gt;
&lt;p&gt;When an access goes past the struct and the last member is a flexible
array, btf_struct_walk() folds the offset back into a single element with
(off - moff) % t-&amp;gt;size, but never checks that the element type has a size.&lt;/p&gt;
&lt;p&gt;BTF takes an empty struct, so this in program BTF&lt;/p&gt;
&lt;p&gt;/* event could be empty */
	struct event {
 #ifdef HAVE_TIMESTAMP
		__u64 ts;
 #endif
	};&lt;/p&gt;
&lt;p&gt;struct batch {
		int nr;
		struct event events[];
	};&lt;/p&gt;
&lt;p&gt;divides by zero at prog load time. Getting there needs a PTR_TO_BTF_ID that
is not MEM_ALLOC, e.g. a plain read of a local kptr stashed in a map from a
sleepable program.&lt;/p&gt;
&lt;p&gt;Oops: divide error: 0000 [#1] SMP KASAN PTI
RIP: 0010:btf_struct_walk+0x53f/0x1570
Call Trace:
 &amp;lt;TASK&amp;gt;
 btf_struct_access+0x42a/0xcd0
 check_ptr_to_btf_access+0x4dc/0x1160
 check_mem_access+0x3a45/0x8740
 check_load_mem+0x36a/0xd10
 do_check_common+0x3ef0/0xb210
 bpf_check+0x6d3b/0x8580
 bpf_prog_load+0xf7c/0x2720
 __sys_bpf+0xa83/0x3690
 __x64_sys_bpf+0xc7/0x150
 x64_sys_call+0x1f3f/0x27e0
 do_syscall_64+0xe5/0x610
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
 &amp;lt;/TASK&amp;gt;&lt;/p&gt;
&lt;p&gt;Reject a zero-sized element type. The fixed array path in the same function
already bails out on the same thing:&lt;/p&gt;
&lt;p&gt;btf_struct_walk()
	...
		/* skip empty array */
		if (moff == mtrue_end)
			continue;&lt;/p&gt;
&lt;p&gt;msize /= total_nelems;&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/cve-2026-98647</guid>
    </item>
  </channel>
</rss>
