bpf, x86: Fix trampoline stack size for 128-bit arguments
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a9c5ad31fbdc4dec6d266fe22e51de1ad6d1bcf2 · < 814cba835ef648e0c5eb79505c96c0493b29eea6| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf, x86: Fix trampoline stack size for 128-bit arguments
btf_distill_func_proto() accepts a function argument up to 16 bytes, so a 128-bit scalar such as __int128 reaches the x86 trampoline with arg_size == 16. But the current implementation assumes an __int128 argument only needs one register, so the register save area is under-allocated and save_args() overwrites adjacent stack slots.
Compute the register count from arg_size for all arguments to fix it.
From the CVE record · Linux
The Linux kernel’s x86 BPF trampoline under-allocates its register save area for 128-bit arguments. When such an argument reaches the trampoline, saving it overwrites adjacent stack slots. The input does not specify whether exploitation requires local access, authentication, or user interaction.
Engineers running the Linux kernel should check their installations; affected versions are not specified.