bpf: Skip scalar adjustment for BPF_NEG if dst is a pointer
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: Skip scalar adjustment for BPF_NEG if dst is a pointer
In check_alu_op(), the verifier currently calls check_reg_arg() and adjust_scalar_min_max_vals() unconditionally for BPF_NEG operations. However, if the destination register holds a pointer, these scalar adjustments are unnecessary and potentially incorrect.
This patch adds a check to skip the adjustment logic when the destination register contains a pointer.
From the CVE record · Linux
The Linux kernel BPF verifier may incorrectly apply scalar adjustments during BPF_NEG operations when the destination register holds a pointer. The input does not specify what an attacker could do or whether exploitation requires network access, authentication, or user interaction.
Engineers running Linux kernels should check their versions; affected versions are not specified in the input.