In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix overloading of MEM_UNINIT's meaning
Lonial reported an issue in the BPF verifier where check_mem_size_reg() has the following code:
if (!tnum_is_const(reg->var_off)) /* For unprivileged variable accesses, disable raw * mode so that the program is required to * initialize all the memory that the helper could * just partially fill up. */ meta = NULL;
This means that writes are not checked when the register containing the size of the passed buffer has not a fixed size. Through this bug, a BPF program can write to a map which is marked as read-only, for example, .rodata global maps.
The problem is that MEM_UNINIT's initial meaning that "the passed buffer to the BPF helper does not need to be initialized" which was added back in commit 435faee1aae9 ("bpf, verifier: add ARG_PTR_TO_RAW_STACK type") got overloaded over time with "the passed buffer is being written to".
The problem however is that checks such as the above which were added later via 06c1c049721a ("bpf: allow helpers access to variable memory") set meta to NULL in order force the user to always initialize the passed buffer to the helper. Due to the current double meaning of MEM_UNINIT, this bypasses verifier write checks to the memory (not boundary checks though) and only assumes the latter memory is read instead.
Fix this by reverting MEM_UNINIT back to its original meaning, and having MEM_WRITE as an annotation to BPF helpers in order to then trigger the BPF verifier checks for writing to memory.
Some notes: check_arg_pair_ok() ensures that for ARG_CONST_SIZE{,_OR_ZERO} we can access fn->arg_type[arg - 1] since it must contain a preceding ARG_PTR_TO_MEM. For check_mem_reg() the meta argument can be removed altogether since we do check both BPF_READ and BPF_WRITE. Same for the equivalent check_kfunc_mem_size_reg().
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon Linux Ami 2 | — | Upgrade kernel-debuginfo-common-aarch64Upgrade kernel-debuginfoUpgrade kernel-tools-develUpgrade kernel-tools-debuginfoUpgrade python-perf-debuginfoUpgrade kernel-develUpgrade kernelUpgrade kernel-headersUpgrade perfUpgrade bpftoolUpgrade perf-debuginfoUpgrade kernel-livepatch-5.15.191-132.213Upgrade python-perfUpgrade kernel-debuginfo-common-x86_64Upgrade bpftool-debuginfoUpgrade kernel-tools | May 20, 2026 | May 20, 2026 |
| Amazon_linux_2023 | — | Upgrade kernel-livepatch-6.1.127-135.201Upgrade perfUpgrade kernel-debuginfo-common-aarch64Upgrade kernel-toolsUpgrade bpftoolUpgrade python3-perf-debuginfoUpgrade perf-debuginfoUpgrade bpftool-debuginfoUpgrade kernel-modules-extra-commonUpgrade kernel-tools-debuginfoUpgrade kernel-develUpgrade kernel-tools-develUpgrade kernelUpgrade kernel-debuginfo-common-x86_64Upgrade python3-perfUpgrade kernel-debuginfoUpgrade kernel-libbpf-staticUpgrade kernel-libbpf-develUpgrade kernel-libbpfUpgrade kernel-headersUpgrade kernel-modules-extra | Feb 17, 2025 | Nov 7, 2024 |
| Debian | — | Upgrade linuxUpgrade linux-6.1 | Feb 10, 2025 | Nov 7, 2024 |
| Redhat_linux | — | No solution exists | Jul 9, 2025 | Nov 7, 2024 |
| Ubuntu | — | Upgrade linux-image-oem-22.04bUpgrade linux-image-6.8.0-1010-gkeopUpgrade linux-image-generic-hwe-24.04Upgrade linux-image-6.8.0-1026-nvidia-lowlatencyUpgrade linux-image-nvidia-hwe-22.04Upgrade linux-image-6.11.0-1010-lowlatency-64kUpgrade linux-image-aws-lts-24.04Upgrade linux-image-virtualUpgrade linux-image-6.8.0-1023-gkeUpgrade linux-image-6.8.0-1024-oracle-64kUpgrade linux-image-oracleUpgrade linux-image-gcp-lts-24.04Upgrade linux-image-gcp-64k-lts-24.04Upgrade linux-image-6.8.0-1024-oracleUpgrade linux-image-6.11.0-1009-gcpUpgrade linux-image-oem-24.04Upgrade linux-image-6.11.0-1005-realtimeUpgrade linux-image-ibm-lts-24.04Upgrade linux-image-oem-24.04bUpgrade linux-image-generic-hwe-22.04Upgrade linux-image-lowlatency-hwe-22.04Upgrade linux-image-nvidia-lowlatency-64kUpgrade linux-image-nvidia-64k-hwe-22.04Upgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-6.8.0-1027-azureUpgrade linux-image-6.8.0-1028-raspiUpgrade linux-image-raspi-realtimeUpgrade linux-image-gcpUpgrade linux-image-realtimeUpgrade linux-image-6.8.0-1014-azure-nvidiaUpgrade linux-image-nvidia-64k-6.8Upgrade linux-image-generic-64k-hwe-22.04Upgrade linux-image-6.8.0-1026-nvidia-64kUpgrade linux-image-6.8.0-1027-awsUpgrade linux-image-kvmUpgrade linux-image-6.8.0-2023-raspi-realtimeUpgrade linux-image-virtual-hwe-24.04Upgrade linux-image-awsUpgrade linux-image-oem-22.04dUpgrade linux-image-gkeUpgrade linux-image-oracle-64kUpgrade linux-image-6.11.0-1011-oracle-64kUpgrade linux-image-azureUpgrade linux-image-oem-24.04aUpgrade linux-image-oracle-lts-24.04Upgrade linux-image-6.11.0-1009-azure-fdeUpgrade linux-image-6.8.0-58-lowlatency-64kUpgrade linux-image-oem-22.04aUpgrade linux-image-nvidia-lowlatencyUpgrade linux-image-gkeop-6.8Upgrade linux-image-lowlatency-64k-hwe-22.04Upgrade linux-image-6.8.0-1026-nvidia-lowlatency-64kUpgrade linux-image-6.11.0-18-generic-64kUpgrade linux-image-6.8.0-1026-oemUpgrade linux-image-realtime-hwe-24.04Upgrade linux-image-6.11.0-1015-oemUpgrade linux-image-azure-lts-24.04Upgrade linux-image-6.11.0-1008-raspiUpgrade linux-image-generic-64kUpgrade linux-image-azure-fdeUpgrade linux-image-6.11.0-1010-lowlatencyUpgrade linux-image-oracle-64k-lts-24.04Upgrade linux-image-virtual-hwe-22.04Upgrade linux-image-ibm-classicUpgrade linux-image-raspiUpgrade linux-image-generic-lpaeUpgrade linux-image-azure-fde-lts-24.04Upgrade linux-image-gcp-64kUpgrade linux-image-6.11.0-1009-awsUpgrade linux-image-6.8.0-58-lowlatencyUpgrade linux-image-ibmUpgrade linux-image-6.8.0-1028-gcp-64kUpgrade linux-image-6.8.0-58-generic-64kUpgrade linux-image-6.8.0-1024-ibmUpgrade linux-image-lowlatency-64kUpgrade linux-image-lowlatencyUpgrade linux-image-6.8.0-1028-gcpUpgrade linux-image-6.8.0-1027-azure-fdeUpgrade linux-image-6.11.0-1011-oracleUpgrade linux-image-genericUpgrade linux-image-oem-22.04Upgrade linux-image-nvidia-64kUpgrade linux-image-6.11.0-18-genericUpgrade linux-image-6.11.0-1009-azureUpgrade linux-image-oem-22.04cUpgrade linux-image-gkeopUpgrade linux-image-6.8.0-58-genericUpgrade linux-image-6.8.0-1026-nvidiaUpgrade linux-image-6.8.1-1020-realtimeUpgrade linux-image-nvidiaUpgrade linux-image-nvidia-6.8Upgrade linux-image-azure-nvidia | Feb 20, 2025 | Nov 7, 2024 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Jul 2, 2025 | Nov 7, 2024 |
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub