CVE-2025-38723 LoongArch: BPF: Fix jump offset calculation in tailcall

Medium 5.5 Published Updated

A bug in the Linux kernel's LoongArch BPF JIT compiler causes incorrect jump offsets, leading to CPU soft lockups and denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-38723?

CVE-2025-38723 is a medium-severity denial of service vulnerability in Debian Debian Linux, published on 4 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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 in emit_bpf_tail_call is calculated by

"#define jmp_offset (out_offset - (cur_offset))"

is a negative number, which is wrong. The final generated assembly are as follow.

54: bgeu $a2, $t1, -8 # 0x0000004c 58: addi.d $a6, $s5, -1 5c: bltz $a6, -16 # 0x0000004c 60: alsl.d $t2, $a2, $a1, 0x3 64: ld.d $t2, $t2, 264 68: beq $t2, $zero, -28 # 0x0000004c

Before apply this patch, the follow test case will reveal soft lock issues.

cd tools/testing/selftests/bpf/ ./test_progs --allow=tailcalls/tailcall_bpf2bpf_1

dmesg: watchdog: BUG: soft lockup - CPU#2 stuck for 26s! [test_progs:25056]

Which versions are affected by CVE-2025-38723?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2025-38723?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-38723 being exploited?

There is no known exploitation of CVE-2025-38723 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-66791, BELL-CVE-2025-38723, DEBIAN-CVE-2025-38723, GHSA-wvjq-jmp5-gvcr, ROOT-OS-DEBIAN-12-CVE-2025-38723, ROOT-OS-UBUNTU-2404-CVE-2025-38723 and 1 more.

Is CVE-2025-38723 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free