6.3

CVE-2024-42161: bpf: Avoid uninitialized value in BPF_CORE_READ_BITFIELD

Modified
AliasesUBUNTU-CVE-2024-42161DEBIAN-CVE-2024-42161
Published 30-07-2024Last modified 11-05-2026

Vulnerability summary

CVE-2024-42161 is a medium (CVSS 6.3) Use of Uninitialized Resource vulnerability in linux. EPSS estimates a 0.22% chance of exploitation in the next 30 days, higher than 12.6% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 6.3, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
6.3/10
010
Medium · v3.1 (NVD)
EPSS score
0.22%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 28 · Related 24

Timeline

  1. 30-07-2024
    PublishedVulnerability first disclosed.
  2. 11-05-2026
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

3 scores · 3 sources · 1 version

EPSS trend

Probability

0.22%

Chance of exploitation in the next 30 days

Percentile

13%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.22% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, administrative account, no user interaction (CVSS vector). Other conditions: not stated in public data.

Ubuntu117 products
  • linux< 5.15.0-121.131 | < 6.8.0-48.48
  • linux-allwinner-5.19All versions (No fix recorded)
  • linux-aws< 5.15.0-1069.75 | < 6.8.0-1018.20
  • linux-aws-5.0All versions (No fix recorded)
  • linux-aws-5.11All versions (No fix recorded)
Linux2 products
  • linux≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < b694989bb13ed5f166e633faa1eb0f21c6d261a6 | ≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < 3364c2ed1c241989847f19cf83e3db903ce689e3 | ≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < a21d76bd0b0d39518e9a4c19f6cf7c042a974aff | ≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < 7e5471b5efebc30dd0bc035cda86693a5c73d45f | ≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < ff941a8449e712eaf7efca1a13bfb9afd3d99fc2 | ≥ ee26dade0e3bcd8a34ae7520e373fb69365fce7a, < 009367099eb61a4fc2af44d4eb06b6b4de7de6db | 5.5
  • linux_kernel< 5.10.222 | ≥ 5.11, < 5.15.163 | ≥ 5.16, < 6.1.98 | ≥ 6.2, < 6.6.39 | ≥ 6.7, < 6.9.9
Debian1 product
  • linux< 6.1.98-1 | < 6.9.9-1

3 vendors · 120 products

References

28 links
Show all 28 references