bpf: Disallow interpreter fallback for arena-related insns
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Disallow interpreter fallback for arena-related insns
Since the interpreter does not support the arena-related insns, interpreter fallback should not be allowed for these insns in core.c::__bpf_prog_select_runtime().
Currently, when the interpreter executes the arena ST/LDX/STX insns, it would hit the BUG_ON() in ___bpf_prog_run() at run time.
[ 2.579196] BPF interpreter: unknown opcode a2 (imm: 0x0) [ 2.579998] ------------[ cut here ]------------ [ 2.580652] kernel BUG at kernel/bpf/core.c:2349! [ 2.581314] Oops: invalid opcode: 0000 [#1] SMP PTI
Set jit_required as true when arena map is used in the prog to disallow interpreter fallback for arena-related insns.
From the CVE record · Linux
The Linux kernel BPF interpreter does not support arena-related instructions, but programs using them could fall back to it. Running such a program can trigger a kernel BUG and crash; the input does not specify the access required to run the program or whether user interaction is needed.
Anyone running a Linux kernel that supports BPF arena maps should check whether their kernel is affected; no affected versions are specified.