Reach uboot-tools · 8 builds in 4 of 4 releases
full reviewcross-check✓ a member decided
Description · NVD
Buffer Overflow vulnerability in the net/bootp.c in DENEX U-Boot from its initial commit in 2002 (3861aa5) up to today on any platform allows an attacker on the local network to leak memory from four up to 32 bytes of memory stored behind the packet to the network depending on the later use of DHCP-provided parameters via crafted DHCP responses.
Published 2024-08-23NVD
CVSS 3.1Adjacent network · no privileges · no user interaction
How it is reached
- Attack vector
- Adjacent network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
What it costs
- Confidentiality
- High
- Integrity
- None
- Availability
- High
- Scope
- Unchanged
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Fable 5.1 · high confidence · 2026-11-05
CVE-2024-42040 is a DHCP option-parsing overflow in U-Boot's bootloader network stack (net/bootp.c, dhcp_process_options/bootp_process_vendor).
The Infix x86_64 build uses the Buildroot uboot-tools package only to produce the userspace utilities fw_printenv/fw_setenv, mkenvimage and fit_check_sign via the tools-only and envtools make targets; net/bootp.c is never compiled (zero object files exist outside tools/ in the build directory) and no U-Boot bootloader is built or shipped (BR2_TARGET_UBOOT unset, the image boots with Barebox).
The unpatched source file is present in the tarball but is dead code for this product, so the vulnerable code is not in the image.
Evidence 9
UBOOT_TOOLS_BUILD_CMDS runs only `make tools-only` and `make envtools`; the U-Boot bootloader (and its net/ directory) is never built
buildroot/package/uboot-tools/uboot-tools.mk:60-64
Only mkimage/mkeficapsule/mkenvimage/fw_printenv/dumpimage/fit_check_sign are ever installed to the target; no U-Boot binary
buildroot/package/uboot-tools/uboot-tools.mk:103-110
Zero object files under net/ and zero object files anywhere outside tools/, confirming net/bootp.c was not compiled
output/build/uboot-tools-2024.04/net/ (find *.o)
Vulnerable, unpatched upstream code is present in the source tree (no oplen-vs-end bounds check, fixed upstream in v2024.10) but is never built
output/build/uboot-tools-2024.04/net/bootp.c:837-866 (dhcp_process_options)
Only three Buildroot build-system patches (configh drop, no-dot-config-targets, CROSS_BUILD_TOOLS flags) are applied; none touches net/bootp.c — irrelevant since the file is not compiled
output/build/uboot-tools-2024.04/.applied_patches_list
BR2_PACKAGE_UBOOT_TOOLS=y with MKENVIMAGE, FWPRINTENV and FIT_CHECK_SIGN selected; MKIMAGE and DUMPIMAGE off
output/.config:1423-1430
BR2_TARGET_UBOOT is not set; BR2_TARGET_BAREBOX=y — the shipped bootloader is Barebox, not U-Boot
output/.config:3998, configs/x86_64_defconfig:129
The only uboot-tools artifacts in the rootfs are environment/FIT userspace tools; find for *u-boot* in output/target and output/images returns nothing
output/target/usr/sbin/fw_printenv, output/target/usr/bin/mkenvimage, output/target/usr/bin/fit_check_sign
The only 'bootp' reference reachable from the built tools is a string literal in a default CONFIG_BOOTCOMMAND, not network code
output/build/uboot-tools-2024.04/tools/env/fw_env_private.h:39
Version and patches
Upstream affected range: all U-Boot from 2002 through v2024.07; fixed in v2024.10 (bounds checks on DHCP option length in net/bootp.c). The 2024.04 source in this tree contains the unpatched dhcp_process_options/bootp_process_vendor code, and none of the three Buildroot patches (0001-drop-configh-from-tools, 0002-tools-only-in-no-dot-config-targets, 0003-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS) address it. However, the CPE match (denx:u-boot) maps the whole bootloader onto the uboot-tools package, which compiles only tools/ and tools/env/; net/bootp.c is not part of any built or shipped artifact.
Recommendation
Document as N/A for the x86_64 product: the vulnerable code is in the U-Boot bootloader network stack, which is not compiled by the uboot-tools package and not shipped (Barebox is the bootloader). Consider adding a Buildroot/SBOM annotation (e.g. IGNORE_CVES for uboot-tools, as Buildroot does for other bootloader-only U-Boot CVEs) so this and similar U-Boot-proper CVEs stop matching uboot-tools. Re-evaluate only if a target ever ships U-Boot itself (BR2_TARGET_UBOOT) with network boot enabled.
Open questions
None for this build. Other Infix board targets (non-x86_64 defconfigs) were not reviewed; if any of them sets BR2_TARGET_UBOOT with CMD_DHCP/BOOTP enabled, that U-Boot build would need its own assessment against this CVE.
Members of Kernel Kit decide. Sign in if you are one.