EPSS
0.024%
Advisory Published
Updated

CVE-2025-37893: LoongArch: BPF: Fix off-by-one error in build_prologue()

First published: Fri Apr 18 2025(Updated: )

In the Linux kernel, the following vulnerability has been resolved: LoongArch: BPF: Fix off-by-one error in build_prologue() Vincent reported that running BPF progs with tailcalls on LoongArch causes kernel hard lockup. Debugging the issues shows that the JITed image missing a jirl instruction at the end of the epilogue. There are two passes in JIT compiling, the first pass set the flags and the second pass generates JIT code based on those flags. With BPF progs mixing bpf2bpf and tailcalls, build_prologue() generates N insns in the first pass and then generates N+1 insns in the second pass. This makes epilogue_offset off by one and we will jump to some unexpected insn and cause lockup. Fix this by inserting a nop insn.

Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Affected SoftwareAffected VersionHow to fix
Linux Kernel

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2025-37893?

    CVE-2025-37893 has been classified as a moderate severity vulnerability due to its potential to cause kernel hard locks when running BPF programs.

  • How do I fix CVE-2025-37893?

    To fix CVE-2025-37893, update your Linux kernel to the latest stable version where the vulnerability has been patched.

  • What does CVE-2025-37893 affect?

    CVE-2025-37893 specifically affects the Linux kernel running on the LoongArch architecture.

  • What kind of issue does CVE-2025-37893 cause?

    CVE-2025-37893 causes kernel hard lockups when executing BPF programs with tail calls on the affected architecture.

  • Who reported the vulnerability CVE-2025-37893?

    The vulnerability CVE-2025-37893 was reported by Vincent.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203