{"id":41119,"date":"2026-10-19T00:32:14","date_gmt":"2026-10-18T16:32:14","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98647"},"modified":"2026-10-19T00:32:14","modified_gmt":"2026-10-18T16:32:14","slug":"cve-2026-98647","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98647","title":{"rendered":"CVE-2026-98647 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix divide-by-ze"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>bpf: Fix divide-by-zero in btf_struct_walk()<\/p>\n<p>When an access goes past the struct and the last member is a flexible<br \/>\narray, btf_struct_walk() folds the offset back into a single element with<br \/>\n(off &#8211; moff) % t-&gt;size, but never checks that the element type has a size.<\/p>\n<p>BTF takes an empty struct, so this in program BTF<\/p>\n<p>\t\/* event could be empty *\/<br \/>\n\tstruct event {<br \/>\n #ifdef HAVE_TIMESTAMP<br \/>\n\t\t__u64 ts;<br \/>\n #endif<br \/>\n\t};<\/p>\n<p>\tstruct batch {<br \/>\n\t\tint nr;<br \/>\n\t\tstruct event events[];<br \/>\n\t};<\/p>\n<p>divides by zero at prog load time. Getting there needs a PTR_TO_BTF_ID that<br \/>\nis not MEM_ALLOC, e.g. a plain read of a local kptr stashed in a map from a<br \/>\nsleepable program.<\/p>\n<p>Oops: divide error: 0000 [#1] SMP KASAN PTI<br \/>\nRIP: 0010:btf_struct_walk+0x53f\/0x1570<br \/>\nCall Trace:<\/p>\n<p> btf_struct_access+0x42a\/0xcd0<br \/>\n check_ptr_to_btf_access+0x4dc\/0x1160<br \/>\n check_mem_access+0x3a45\/0x8740<br \/>\n check_load_mem+0x36a\/0xd10<br \/>\n do_check_common+0x3ef0\/0xb210<br \/>\n bpf_check+0x6d3b\/0x8580<br \/>\n bpf_prog_load+0xf7c\/0x2720<br \/>\n __sys_bpf+0xa83\/0x3690<br \/>\n __x64_sys_bpf+0xc7\/0x150<br \/>\n x64_sys_call+0x1f3f\/0x27e0<br \/>\n do_syscall_64+0xe5\/0x610<br \/>\n entry_SYSCALL_64_after_hwframe+0x76\/0x7e<\/p>\n<p>Reject a zero-sized element type. The fixed array path in the same function<br \/>\nalready bails out on the same thing:<\/p>\n<p>\tbtf_struct_walk()<br \/>\n\t&#8230;<br \/>\n\t\t\/* skip empty array *\/<br \/>\n\t\tif (moff == mtrue_end)<br \/>\n\t\t\tcontinue;<\/p>\n<p>\t\tmsize \/= total_nelems;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>bpf: Fix divide-by-zero in btf_struct_walk()<\/p>\n<p>When an access goes past the struct and the last member is a flexible<br \/>\narray, btf_stru<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-41119","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/41119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=41119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=41119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=41119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}