Cloudanix VulnDB

CVE-2025-38723

Medium · 5.5

CVSS

5.5

EPSS

0.2%

Published

Sep 4, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the Linux kernel on certain hardware can cause the computer to freeze when specialized network or security programs run, requiring a restart to recover.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Denial Of Service
Component
OS kernel
Class
Other
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Incorrect jump offset calculation in LoongArch BPF tailcall emission due to skipped JIT context initialization on extra compile passes produces negative jmp_offset values, resulting in invalid branch targets and infinite loops within BPF programs.

Why it matters to the business

Systems running affected Linux kernels on LoongArch hardware can experience CPU soft lockups and watchdog-triggered hangs when BPF programs using tailcalls are executed, leading to service disruption and potential need for manual intervention or reboots.

How an attack unfolds

An attacker with local access loads a crafted BPF program containing tailcalls that triggers the offset miscalculation during JIT compilation; the resulting malformed assembly causes the kernel to repeatedly execute incorrect branches, inducing a soft lockup condition observable in dmesg.

How to fix it

Update to fixed kernel versions containing commit 1a782fa32e644aa9fbae6c8488f3e61221ac96e1 or equivalent stable patches; for MinimOS nodejs-24 packages upgrade to 24.4.1-r0 or later; rebuild and redeploy any affected BPF programs after kernel update.

How to confirm the fix worked

Verify kernel source contains the tailcall offset fix commit; re-run the selftest tailcalls/tailcall_bpf2bpf_1 and confirm absence of soft lockup messages in dmesg; check package versions match listed fixed releases.

Typical attack path

  1. Obtain local unprivileged access on a LoongArch Linux system
  2. Compile and load a BPF program that exercises tailcall paths via bpf() syscall
  3. Trigger JIT compilation with multiple passes to skip offset calculation
  4. Observe resulting negative jump offsets leading to CPU lockup

How to detect it

Search kernel logs and dmesg for watchdog soft lockup messages coinciding with BPF tailcall test execution or bpf program loads; correlate with process names involving test_progs or bpftool on LoongArch systems.

What your security team should do

  • Prioritize kernel updates on all LoongArch production systems within standard patch windows
  • Audit environments for use of BPF tailcalls and schedule test execution of affected selftests post-update
  • Monitor EPSS trend and re-evaluate if new exploit code appears given current low score

The record

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]

Affected packages

Ecosystem Package Introduced Fixed
Debian:12 linux 0 No fix
Debian:13 linux 0 6.12.43-1
Debian:14 linux 0 6.16.3-1
Linux Kernel 6.1.0 6.1.149
Mageia:9 kernel 0 6.6.105-1.mga9
Mageia:9 kernel-linus 0 6.6.105-1.mga9
Mageia:9 kmod-virtualbox 0 7.1.10-10.mga9
Mageia:9 kmod-xtables-addons 0 3.24-86.mga9
Mageia:9 mageia-repos 0 9-4.mga9
Mageia:9 meta-task 0 9-4.mga9

Related vulnerabilities