bpf: Clear buf on error in __bpf_get_task_stack
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 06ab134ce8ecfa5a69e850f88f81c8a4c3fa91df · < f5d242825ca417bb6afe35fde6e8880f97ca43fb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Clear buf on error in __bpf_get_task_stack
Both bpf_get_task_stack and bpf_get_task_stack_sleepable helpers that use __bpf_get_task_stack have buf defined as ARG_PTR_TO_UNINIT_MEM argument and we should initialize the buf on every return path.
Adding missing buf memset for __bpf_get_task_stack fail paths. This provides deterministic buffer contents, which is useful when the buffer is used directly as a map key.
From the CVE record · Linux
The Linux kernel's BPF task-stack helpers can return without initializing their output buffer when __bpf_get_task_stack fails. This can leave buffer contents nondeterministic, including when the buffer is used as a map key. The input does not specify an attacker impact, access requirements, or user interaction.
Engineers running Linux kernels with the affected BPF task-stack helpers should check their versions; affected versions are not specified.