libbpf: Reject non-exclusive metadata maps in the signed loader
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 |
|
|
6.18.407.1.57.2In the Linux kernel, the following vulnerability has been resolved:
libbpf: Reject non-exclusive metadata maps in the signed loader
The loader verifies map->sha against the metadata hash in its instructions. map->sha is calculated when BPF_OBJ_GET_INFO_BY_FD is called on the frozen map.
While the map is frozen, the /signed loader/ must also ensure the map is exclusive, as, without exclusivity (which a hostile host could just omit when loading the loader), another BPF program with map access can mutate the contents afterwards, so the check passes on stale data.
With the extra check as part of the signed loader, it now refuses to move on with map->sha validation if the host set it up wrongly.
From the CVE record · Linux
The Linux libbpf signed loader could validate a frozen metadata map without ensuring the map is exclusive. A hostile host that sets up a non-exclusive map can allow another BPF program with map access to change its contents after the hash is calculated, causing validation to pass on stale data.
Engineers running Linux with the libbpf signed loader should check their deployments; affected versions are not specified.