bpf: Allow delete from sockmap/sockhash only if update is allowed
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ff91059932401894e6c86341915615c5eb0eca48 · < 98e948fb60d41447fd8d2d0c3b8637fc6b6dc26d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Allow delete from sockmap/sockhash only if update is allowed
We have seen an influx of syzkaller reports where a BPF program attached to a tracepoint triggers a locking rule violation by performing a map_delete on a sockmap/sockhash.
We don't intend to support this artificial use scenario. Extend the existing verifier allowed-program-type check for updating sockmap/sockhash to also cover deleting from a map.
From now on only BPF programs which were previously allowed to update sockmap/sockhash can delete from these map types.
From the CVE record · Linux
The Linux kernel allowed a BPF program attached to a tracepoint to delete from a sockmap or sockhash even when that program type was not allowed to update it. This can trigger a locking rule violation. The input does not specify authentication requirements or user interaction.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.