Back

HIGH

LoongArch: BPF: Refactor jump offset calculation in tail call

Published Sep 16, 2026

Description

The old macro-based jmp_offset calculation derives the jump distance from a stale prior-pass code stride, which can lead to wrong branch offsets and soft lockups under extra JIT passes.

Fix this by calculating the offset directly on the absolute target: "ctx->offset[insn + 1] - ctx->idx".

To avoid a false 16-bit range check abort during size estimation, add a "ctx->image == NULL" guard to inject a safe dummy offset.

Affected products

Remediation

No remediation recorded yet.

Metrics

Weaknesses (0)

No CWE recorded.

References (3)

Change history (0)

No recorded changes yet.

Sources
CVE.org / MITRE
Status PUBLISHED
Assigner Linux
Published Sep 16, 2026
Updated Sep 16, 2026
Reserved Sep 11, 2026
NVD
Status Received
Modified Sep 16, 2026
Red Hat
Severity n/a
Public date n/a