cve.bz

CVE-2024-50164 linux linux kernel

7.1 highEPSS 0.2%Fix available

High (7.1) in linux linux kernel. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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().

Severity

CVSS 3.1

7.1 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 12th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
Published
Modified
Assigned by
Linux (CNA)
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-50164 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-50164?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-50164?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-50164 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2024-50164

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2024-50164](https://cve.bz/cve/badge/CVE-2024-50164.svg)](https://cve.bz/cve/CVE-2024-50164)

HTML:

<a href="https://cve.bz/cve/CVE-2024-50164"><img src="https://cve.bz/cve/badge/CVE-2024-50164.svg" alt="CVE-2024-50164"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linuxfrom 5.15.45 before 5.16
Linuxfrom 5.17.13 before 5.18
Linuxfrom 5.18.2 before 5.19
Linux5.19 and later

Fixed in

ProductRelease lineFixed in
Linux6.16.1.125
Linux6.66.6.59
Linux6.116.11.6
Linuxlater releases6.12

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11linux-6.16.1.128-1~deb11u1DLA-4076-1
Debian12linux6.1.128-1DEBIAN-CVE-2024-50164 DSA-5860-1
Debian13, 14linux6.11.6-1DEBIAN-CVE-2024-50164
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2024-50164
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 11 moreno fix listedUBUNTU-CVE-2024-50164
Ubuntu20.04:LTSlinux-gke, linux-riscv, linux-raspi2 and 25 moreno fix listedUBUNTU-CVE-2024-50164
Ubuntu22.04:LTSlinux, linux-aws, linux-gcp and 47 moreno fix listedUBUNTU-CVE-2024-50164
Ubuntu22.04:LTSlinux-aws-6.86.8.0-1027.29~22.04.1UBUNTU-CVE-2024-50164 USN-7451-1
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1027.32~22.04.1UBUNTU-CVE-2024-50164 USN-7449-1
Ubuntu22.04:LTSlinux-gcp-6.86.8.0-1028.30~22.04.1UBUNTU-CVE-2024-50164 USN-7452-1
Ubuntu22.04:LTSlinux-hwe-6.86.8.0-58.60~22.04.1UBUNTU-CVE-2024-50164 USN-7449-2
Ubuntu22.04:LTSlinux-ibm-6.86.8.0-1024.24~22.04.1UBUNTU-CVE-2024-50164
Ubuntu22.04:LTSlinux-nvidia-6.86.8.0-1026.29~22.04.1UBUNTU-CVE-2024-50164 USN-7449-1
Ubuntu22.04:LTSlinux-oracle-6.86.8.0-1024.25~22.04.1UBUNTU-CVE-2024-50164 USN-7449-1
Ubuntu22.04:LTSlinux-riscv-6.8, linux-lowlatency-hwe-6.86.8.0-58.60.1~22.04.1UBUNTU-CVE-2024-50164 USN-7449-1
29 more for Ubuntu in the JSON and on Ubuntu's page.
openSUSETumbleweedkernel-source6.11.8-1.1openSUSE-SU-2024:14500-1
openSUSETumbleweedkernel-source-longterm6.12.11-1.1openSUSE-SU-2025:14705-1
Azure Linux3kernel6.6.64.2-1AZL-53561
Alpaquita23linux-lts6.1.127-r0BELL-CVE-2024-50164
Alpaquita25, streamlinux-lts6.12.41-r0BELL-CVE-2024-50164

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

The default Red Hat Enterprise Linux kernel prevents unprivileged users from being able to use eBPF by the kernel.unprivileged_bpf_disabled sysctl. This would require a privileged user with CAP_SYS_ADMIN or root to be able to abuse this flaw reducing its attack space.

For the Red Hat Enterprise Linux 9 to confirm the current state, inspect the sysctl with the command:

cat /proc/sys/kernel/unprivileged_bpf_disabled

The setting of 1 would mean that unprivileged users can not use eBPF, mitigating the flaw.

Red Hat's mitigation

To mitigate this issue, ensure that unprivileged eBPF is disabled by setting `kernel.unprivileged_bpf_disabled` to 1. This prevents unprivileged users from loading eBPF programs.

To check the current status, run:

```bash

cat /proc/sys/kernel/unprivileged_bpf_disabled

```

If the output is 0, enable the mitigation by running:

```bash

sudo sysctl -w kernel.unprivileged_bpf_disabled=1

```

To make this change persistent across reboots, add or modify the following line in `/etc/sysctl.d/99-sysctl.conf` (or a similar sysctl configuration file):

```

kernel.unprivileged_bpf_disabled = 1

```

Then, apply the changes:

```bash

sudo sysctl --system

```

Note that these actions require root privileges.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelOut of support scope
Red Hat Enterprise Linux 7kernel-rtOut of support scope
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-50164.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-295-11Siemens SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP2026-10-13Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= V3.1.7, SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= V3.1.7, SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= V3.1.7 and 2 morenone listed
ICSA-26-209-04Siemens SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP2026-07-14Critical ManufacturingSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= V3.1.6, SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= V3.1.6, SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= V3.1.6 and 2 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

References

Check your stackJSON