bpf: Tighten cgroup storage cookie checks for prog arrays
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ abad3d0bad72a52137e0c350c59542d75ae4f513 · < cb22dc79528eb26a46d346c3118dbd6b14c70609| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Tighten cgroup storage cookie checks for prog arrays
The fix in commit abad3d0bad72 ("bpf: Fix oob access in cgroup local storage") is still incomplete. The prog-array compatibility check treats a program with no cgroup storage as compatible with any stored storage cookie. This allows a storage-less program to bridge a tail call chain between an entry program and a storage-using callee even though cgroup local storage at runtime still follows the caller's context, that is, A -> B(no storage) -> C(storage) path.
Requiring exact cookie equality would break the legitimate case of a storage-less leaf program being tail called from a storage-using one. Instead, only accept a zero storage cookie if the program cannot perform tail calls itself. This keeps A -> B(no storage) working while rejecting the A -> B(no storage) -> C(storage) bridge.
From the CVE record · Linux
The Linux kernel’s BPF prog-array compatibility check can incorrectly accept a program with no cgroup storage between a calling program and a storage-using callee. This can lead to out-of-bounds access in cgroup local storage when that tail-call chain runs. The input does not specify whether exploitation requires local access, authentication, or user interaction.
Engineers running Linux kernels should check whether their kernel includes the corrected BPF cgroup storage cookie checks; affected versions are not specified.