HIGH Introduced in 6.9
bpf KfuncArg Bypass
CVE-2026-90195
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: riscv, bpf: Fix missing sign-ext for signed 1-byte and 2-byte kfunc args On RV64, the ABI requires sign-extension for signed 1-byte and 2-byte kfunc args. However, the RV64 JIT currently does not perform sign-extension for such kfunc args. Before commit 7ce090afbf72 ("bpf: Infer zext_dst based on static register liveness analysis"), state pruning could potentially omit zero-extension of 32-bit subregisters, which inadvertently masked the above issue by making the args appear as if they had been properly sign-extended. After that commit, the problem is exposed, causing the kfunc_call/kfunc_call_test4 selftest to fail. Fix this by extending the existing sign-extension logic to handle signed 1-byte and 2-byte kfunc args as well.
02KernelScan AI Analysis
Risk summary
A BPF JIT bug on RISC-V 64-bit systems causes signed 1-byte and 2-byte kfunc arguments to be passed with incorrect (zero-extended instead of sign-extended) values, potentially bypassing BPF verifier safety checks and leading to wrong kernel function behavior. Any local process with BPF loading privileges (CAP_BPF) on an affected RISC-V 64-bit system can trigger this. The impact ranges from incorrect computation results to potential memory corruption depending on which kernel functions are called and how they use the misinterpreted arguments.
Vulnerability analysis
The RISC-V 64-bit BPF JIT compiler fails to sign-extend signed 1-byte and 2-byte arguments when kernel functions are called from BPF programs. The BPF calling convention zero-extends smaller register values, but the RISC-V ABI requires sign-extension for signed types, so kernel functions receive incorrect argument values—for instance, a signed char value of -3 arrives as 253 instead. Because the BPF verifier checks program safety using the correct values while the JIT generates native code with the wrong values, the verifier's bounds and safety checks can be silently bypassed for affected arguments. The fix extends the JIT's existing sign-extension logic to cover these smaller signed argument sizes using type information from the kernel function declarations. This vulnerability is reachable from any local process with BPF program loading privileges on RISC-V 64-bit systems; it does not affect other architectures.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 6.9 | 6.12.110 | 555fc6f1caf0 |
| 6.18 | 6.9 | 6.18.52 | 801ae90f8ce0 |
| 7.2 | 6.9 | 7.2.6 | 71dbd143be59 |
| mainline | 6.9 | 7.3 | f2aaa6215910 |
| cip/6.12 | 6.9 | 6.12.111-cip32 | 555fc6f1caf0 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |