bpf: Check the helper function is valid in get_helper_proto
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bpf: Check the helper function is valid in get_helper_proto
kernel test robot reported verifier bug [1] where the helper func pointer could be NULL due to disabled config option.
As Alexei suggested we could check on that in get_helper_proto directly. Marking tail_call helper func with BPF_PTR_POISON, because it is unused by design.
[1] https://lore.kernel.org/oe-lkp/202507160818.68358831-lkp@intel.com
From the CVE record · Linux
The Linux kernel BPF verifier could receive a NULL helper function pointer when a configuration option is disabled. The input does not establish what an attacker can do or specify access or user-interaction requirements.
Engineers running Linux kernels with BPF enabled should check whether their kernel includes the fix; affected versions are not specified.