bpf: Guard conntrack opts error writes
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b4c2b9593a1c4c3a718370e34af28e817fd5e5c6 · < 6f6183a39533d727deaa5061cadae6dd9e6744d0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Guard conntrack opts error writes
The conntrack lookup and allocation kfuncs take an opts pointer together with an opts__sz argument. The verifier checks only the memory range described by opts__sz, but the wrappers unconditionally write opts->error whenever the internal lookup or allocation helper returns an error.
For an invalid size smaller than the end of opts->error, that write can land outside the verifier-checked range. Keep returning NULL for invalid arguments, but only report the error through opts->error when the supplied size includes the field.
This preserves error reporting for the supported 12-byte and 16-byte layouts, and for other invalid sizes that still include opts->error.
From the CVE record · Linux
The Linux kernel’s BPF conntrack lookup and allocation functions can write an error outside the memory range checked by the verifier. This occurs when an invalid opts__sz excludes opts->error and an internal helper returns an error. The input does not specify how an attacker could reach this condition or whether authentication or user interaction is required.
Engineers running the Linux kernel should check their versions for this issue; affected versions are not specified.