CVE-2026-90195: riscv, bpf: Fix missing sign-ext for signed 1-byte and 2-byte kfunc args
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 zextdst 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 kfunccall/kfunccalltest4 selftest to fail.
Fix this by extending the existing sign-extension logic to handle signed 1-byte and 2-byte kfunc args as well.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
riscv, bpfto a version that resolves this vulnerability.Patch riscv, bpf: Fix missing sign-ext for signed 1-byte and 2-byte kfunc args
Event History
Frequently Asked Questions
Which systems are affected by this issue?
The issue affects Linux systems using the RV64 RISC-V BPF JIT and kfunc calls with signed 1-byte or 2-byte arguments. The provided information does not identify affected kernel versions or configurations beyond that.
What conditions are needed to trigger the problem?
A BPF program must make a kfunc call that passes signed 1-byte or 2-byte arguments on RV64. The JIT's failure to sign-extend those arguments violates the RV64 ABI.
How can I determine whether the issue is present?
The kfunc_call/kfunc_call_test4 selftest fails when the issue is exposed. The description notes that the behavior became exposed after commit 7ce090afbf72, which changed zero-extension inference through static register liveness analysis.