Skip to main content
Network Thinking Solutions Logo

CVE-2024-42161

In the Linux kernel, the following vulnerability has been resolved: bpf: Avoid uninitialized value in BPF_CORE_READ_BITFIELD [Changes from V1: - Use a default branch in the switch statement to initialize `val'.

All CVEs
CVE-2024-42161Published 7/30/2024

In the Linux kernel, the following vulnerability has been resolved: bpf: Avoid uninitialized value in BPF_CORE_READ_BITFIELD [Changes from V1: - Use a default branch in the switch statement to initialize `val'.

Vendor advisory
CVSS6.3Medium

Overview

In the Linux kernel, the following vulnerability has been resolved: bpf: Avoid uninitialized value in BPF_CORE_READ_BITFIELD [Changes from V1: - Use a default branch in the switch statement to initialize `val'.] GCC warns that `val' may be used uninitialized in the BPF_CRE_READ_BITFIELD macro, defined in bpf_core_read.h as: [...] unsigned long long val; \ [...] \ switch (__CORE_RELO(s, field, BYTE_SIZE)) { \ case 1: val = *(const unsigned char *)p; break; \ case 2: val = *(const unsigned short *)p; break; \ case 4: val = *(const unsigned int *)p; break; \ case 8: val = *(const unsigned long long *)p; break; \ } \ [...] val; \ } \ This patch adds a default entry in the switch statement that sets `val' to zero in order to avoid the warning, and random values to be used in case __builtin_preserve_field_info returns unexpected values for BPF_FIELD_BYTE_SIZE. Tested in bpf-next master. No regressions.

Published
7/30/2024
Last modified
6/17/2026
CVE assigner
Not available
NVD analysis
Not available

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
linux kernel
linux
< 5.10.222

Verify advisory

Source
linux kernel
linux
≥ 5.11, < 5.15.163

Verify advisory

Source
linux kernel
linux
≥ 5.16, < 6.1.98

Verify advisory

Source
linux kernel
linux
≥ 6.2, < 6.6.39

Verify advisory

Source
linux kernel
linux
≥ 6.7, < 6.9.9

Verify advisory

Source
Linux
Linux
≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < b694989bb13ed5f166e633faa1eb0f21c6d261a6

Verify advisory

Source
Linux
Linux
≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < 3364c2ed1c241989847f19cf83e3db903ce689e3

Verify advisory

Source
Linux
Linux
≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < a21d76bd0b0d39518e9a4c19f6cf7c042a974aff

Verify advisory

Source
Linux
Linux
≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < 7e5471b5efebc30dd0bc035cda86693a5c73d45f

Verify advisory

Source
Linux
Linux
≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < ff941a8449e712eaf7efca1a13bfb9afd3d99fc2

Verify advisory

Source
Linux
Linux
≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < 009367099eb61a4fc2af44d4eb06b6b4de7de6db

Verify advisory

Source
Linux
Linux
5.5

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

Vendor advisory links

Derived from non-aggregator references because the source record has no vendor tags. Verify the advisory before acting on it.

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

Published headline score: 6.3. Score version, vector, and attribution are not available in this record. Additional score details appear when the source record is next refreshed.

Sources & references

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.