CVE-2025-22048 LoongArch: BPF: Don't override subprog's return value
A logic error in the LoongArch BPF JIT compiler causes a kernel panic when executing specific BPF programs, leading to a 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-22048?
CVE-2025-22048 is a high-severity denial of service vulnerability in Linux kernel, published on 16 Apr 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: Don't override subprog's return value
The verifier test `calls: div by 0 in subprog` triggers a panic at the ld.bu instruction. The ld.bu insn is trying to load byte from memory address returned by the subprog. The subprog actually set the correct address at the a5 register (dedicated register for BPF return values). But at commit 73c359d1d356 ("LoongArch: BPF: Sign-extend return values") we also sign extended a5 to the a0 register (return value in LoongArch). For function call insn, we later propagate the a0 register back to a5 register. This is right for native calls but wrong for bpf2bpf calls which expect zero-extended return value in a5 register. So only move a0 to a5 for native calls (i.e. non-BPF_PSEUDO_CALL).
Which versions are affected by CVE-2025-22048?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-22048?
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-22048 being exploited?
There is no known exploitation of CVE-2025-22048 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2025-22048, DEBIAN-CVE-2025-22048, GHSA-4vfw-gvwq-xw7v, ROOT-OS-DEBIAN-12-CVE-2025-22048, UBUNTU-CVE-2025-22048.