cbcvebase.
CVE-2024-42161
published 2024-07-30

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…

PriorityP424medium6.3CVSS 3.1
AVLACLPRHUINSUCLIHAH
EPSS
0.22%
12.7th percentile
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.

Affected

28 ranges· showing 25
VendorProductVersion rangeFixed in
debianlinux< linux 6.1.98-1 (bookworm)linux 6.1.98-1 (bookworm)
debianlinux-6.1< linux 6.1.98-1 (bookworm)linux 6.1.98-1 (bookworm)
linuxlinux
linuxlinux>= ee26dade0e3bcd8a34ae7520e373fb69365fce7a < b694989bb13ed5f166e633faa1eb0f21c6d261a6b694989bb13ed5f166e633faa1eb0f21c6d261a6
linuxlinux>= ee26dade0e3bcd8a34ae7520e373fb69365fce7a < 3364c2ed1c241989847f19cf83e3db903ce689e33364c2ed1c241989847f19cf83e3db903ce689e3
linuxlinux>= ee26dade0e3bcd8a34ae7520e373fb69365fce7a < a21d76bd0b0d39518e9a4c19f6cf7c042a974affa21d76bd0b0d39518e9a4c19f6cf7c042a974aff
linuxlinux>= ee26dade0e3bcd8a34ae7520e373fb69365fce7a < 7e5471b5efebc30dd0bc035cda86693a5c73d45f7e5471b5efebc30dd0bc035cda86693a5c73d45f
linuxlinux>= ee26dade0e3bcd8a34ae7520e373fb69365fce7a < ff941a8449e712eaf7efca1a13bfb9afd3d99fc2ff941a8449e712eaf7efca1a13bfb9afd3d99fc2
linuxlinux>= ee26dade0e3bcd8a34ae7520e373fb69365fce7a < 009367099eb61a4fc2af44d4eb06b6b4de7de6db009367099eb61a4fc2af44d4eb06b6b4de7de6db
linuxlinux_kernel< 5.10.2225.10.222
linuxlinux_kernel>= 0 < 5.10.223-15.10.223-1
linuxlinux_kernel>= 0 < 6.1.98-16.1.98-1
linuxlinux_kernel>= 0 < 6.9.9-16.9.9-1
linuxlinux_kernel>= 0 < 6.9.9-16.9.9-1
linuxlinux_kernel>= 0 < 5.15.0-121.1315.15.0-121.131
linuxlinux_kernel>= 0 < 6.8.0-48.486.8.0-48.48
linuxlinux_kernel>= 5.11 < 5.15.1635.15.163
linuxlinux_kernel>= 5.16 < 6.1.986.1.98
linuxlinux_kernel>= 6.2 < 6.6.396.6.39
linuxlinux_kernel>= 6.7 < 6.9.96.9.9
msrcazl3_kernel_6.6.35.1-5_on_azure_linux_3.0
msrcazl3_kernel_6.6.43.1-7_on_azure_linux_3.0
msrcazure_linux_3.0_arm
msrcazure_linux_3.0_x64
msrccbl2_kernel_5.15.162.2-1_on_cbl_mariner_2.0

CVSS provenance

nvdv3.16.3MEDIUMCVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:H/A:H
osv6.3MEDIUM
vendor_debian6.3MEDIUM
vendor_msrc6.3MEDIUM
vendor_redhat6.3MEDIUM
vendor_ubuntu6.3MEDIUM
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.