{"id":69506,"date":"2025-09-04T21:32:31","date_gmt":"2025-09-04T18:02:31","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-38723-loongarch-bpf-fix-jump-offset-calculation-in-tailcall\/"},"modified":"2025-09-04T21:32:31","modified_gmt":"2025-09-04T18:02:31","slug":"cve-2025-38723-loongarch-bpf-fix-jump-offset-calculation-in-tailcall","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-38723-loongarch-bpf-fix-jump-offset-calculation-in-tailcall\/","title":{"rendered":"CVE-2025-38723 &#8211; LoongArch: BPF: Fix jump offset calculation in tailcall"},"content":{"rendered":"<p><strong>CVE ID : <\/strong>CVE-2025-38723<br \/>\n<br \/>\n<strong>Published : <\/strong> Sept. 4, 2025, 4:15 p.m. | 56\u00a0minutes ago<br \/>\n<br \/>\n<strong>Description : <\/strong>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>LoongArch: BPF: Fix jump offset calculation in tailcall<\/p>\n<p>The extra pass of bpf_int_jit_compile() skips JIT context initialization<br \/>\nwhich essentially skips offset calculation leaving out_offset = -1, so<br \/>\nthe jmp_offset in emit_bpf_tail_call is calculated by<\/p>\n<p>&#8220;#define jmp_offset (out_offset &#8211; (cur_offset))&#8221;<\/p>\n<p>is a negative number, which is wrong. The final generated assembly are<br \/>\nas follow.<\/p>\n<p>54:\tbgeu        \t$a2, $t1, -8\t    # 0x0000004c<br \/>\n58:\taddi.d      \t$a6, $s5, -1<br \/>\n5c:\tbltz        \t$a6, -16\t    # 0x0000004c<br \/>\n60:\talsl.d      \t$t2, $a2, $a1, 0x3<br \/>\n64:\tld.d        \t$t2, $t2, 264<br \/>\n68:\tbeq         \t$t2, $zero, -28\t    # 0x0000004c<\/p>\n<p>Before apply this patch, the follow test case will reveal soft lock issues.<\/p>\n<p>cd tools\/testing\/selftests\/bpf\/<br \/>\n.\/test_progs &#8211;allow=tailcalls\/tailcall_bpf2bpf_1<\/p>\n<p>dmesg:<br \/>\nwatchdog: BUG: soft lockup &#8211; CPU#2 stuck for 26s! [test_progs:25056]\n<br \/>\n<strong>Severity:<\/strong> 0.0 | NA<br \/>\n<br \/>\nVisit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-38723 Published : Sept. 4, 2025, 4:15 p.m. | 56\u00a0minutes ago Description : In the Linux kernel, the following vulnerability has been resolved: LoongArch: BPF: Fix jump offset calculation in tailcall The extra pass of bpf_int_jit_compile() skips JIT context initialization which essentially skips offset calculation leaving out_offset = -1, so the jmp_offset &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-69506","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/69506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=69506"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/69506\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=69506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=69506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=69506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}