bpf: Preserve pointer state for commuted arithmetic
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f4d7e40a5b7157e1329c3c5b10f60d8289fc2941 · < db6382ed3361bdd8129572a3423956cba1dae829| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Preserve pointer state for commuted arithmetic
When scalar += pointer is handled in adjust_ptr_min_max_vals(), the destination register inherits the pointer state from the source pointer. Copying only selected fields is fragile because pointer provenance is tracked by several bpf_reg_state fields.
Use the caller's temporary offset register to preserve the scalar operand while replacing the destination with the full pointer state. This preserves the frame number for PTR_TO_STACK registers and keeps parent identity fields consistent.
From the CVE record · Linux
The Linux kernel’s BPF verifier can lose pointer provenance when handling scalar += pointer arithmetic. The input does not specify what an attacker could do or whether exploitation requires local access, authentication, or user interaction.
Engineers running Linux kernels should check their exposure; affected versions are not specified.