bpf: Fix immediate JMP JEQ/JNE on MIPS32
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ eb63cfcd2ee8ec3805f6881f43341f589c3d2278 · < db762fd96be225bd06161c9631160c755d891693| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix immediate JMP JEQ/JNE on MIPS32
An addu instruction was emitted instead of addiu, causing the immediate value 1 to be interpreted as register $at. This made the comparison result invalid when the immediate operand was negative. Note that $at is mapped to BPF_REG_AX, which is used for constant blinding.
Fix the instruction to use the immediate form.
Found with test_bpf on MIPS32r1 emulated by QEMU.
From the CVE record · Linux
On MIPS32, the Linux kernel emits the wrong instruction for immediate BPF JEQ/JNE comparisons, producing an invalid comparison result when the immediate operand is negative. The input does not describe an attacker outcome or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels on MIPS32 should check whether their kernel includes the fix; affected versions are not specified.