Reach uboot-tools · 8 builds in 4 of 4 releases
full reviewcross-check✓ a member decided
Description · NVD
An integer overflow in ext4fs_read_symlink in Das U-Boot before 2025.01-rc1 occurs for zalloc (adding one to an le32 variable) via a crafted ext4 filesystem with an inode size of 0xffffffff, resulting in a malloc of zero and resultant memory overwrite.
Published 2025-02-18NVD
CVSS 3.1Physical · no privileges · no user interaction
How it is reached
- Attack vector
- Physical
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
What it costs
- Confidentiality
- High
- Integrity
- High
- Availability
- High
- Scope
- Unchanged
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Fable 5.1 · high confidence · 2026-11-17
The vulnerable function is present unpatched in the tarball (output/build/uboot-tools-2024.04/fs/ext4/ext4_common.c:2197 still does zalloc(le32_to_cpu(diro->inode.size) + 1) with no U32_MAX guard, and none of the three Buildroot patches touch fs/), but it is never compiled. The uboot-tools package (both the target and host variants) builds only the tools-only and envtools make targets (buildroot/package/uboot-tools/uboot-tools.mk:61-63,227-228), which descend only into tools/ and tools/env/ (output/build/uboot-tools-2024.04/Makefile:2128-2133). The objects those tools pull in from the main tree are limited to boot/, common/hash.o, env/embedded.o and lib/ hash/CRC/fdt files; tools/Makefile and tools/env/Makefile contain no reference to fs/ or ext4 at all.
What actually lands in the image is fit_check_sign, mkenvimage and fw_printenv/fw_setenv (output/target/usr/bin/, output/target/usr/sbin/), none of which parse ext4 filesystems. The U-Boot bootloader proper, which is what the CVE targets, is not built in this configuration (output/.config:3912, # BR2_TARGET_UBOOT is not set). The CPE match is on the shared denx:u-boot product/version and therefore fires on the tools package even though the ext4 driver is not part of it.
Evidence 9
Unfixed vulnerable code is present in the source: `symlink = zalloc(le32_to_cpu(diro->inode.size) + 1)` with no overflow check (upstream fix 35f75d2a not backported).
output/build/uboot-tools-2024.04/fs/ext4/ext4_common.c:2197
Only three Buildroot patches applied (drop-configh, tools-only-in-no-dot-config-targets, tools/Makefile CFLAGS); none touch fs/ext4.
output/build/uboot-tools-2024.04/.applied_patches_list
Target package build runs only `make ... CROSS_BUILD_TOOLS=y tools-only` and the envtools target.
buildroot/package/uboot-tools/uboot-tools.mk:61-63
Host package build likewise runs only `tools-only` and `envtools no-dot-config-targets=envtools`.
buildroot/package/uboot-tools/uboot-tools.mk:227-228
`tools-only` target only runs `$(MAKE) $(build)=tools`; `envtools` (line 2128-2129) only builds `tools/env`. The `fs/` directory is never built.
output/build/uboot-tools-2024.04/Makefile:2131-2133
All `generated/*.o` objects linked into the host tools come from boot/, common/hash.o, env/embedded.o and lib/ (crc, sha, md5, fdt); `grep -rn 'ext4|fs/'` over tools/Makefile and tools/env/Makefile returns nothing.
output/build/uboot-tools-2024.04/tools/Makefile
The only uboot-tools binaries installed into the image; none contain or use the ext4 filesystem driver.
output/target/usr/bin/fit_check_sign, output/target/usr/bin/mkenvimage, output/target/usr/sbin/fw_printenv
`# BR2_TARGET_UBOOT is not set` - the U-Boot bootloader itself (where fs/ext4 would be compiled) is not built in this configuration.
output/.config:3912
Package is selected both as target (`BR2_PACKAGE_UBOOT_TOOLS=y`) and host (`BR2_PACKAGE_HOST_UBOOT_TOOLS=y`) with FIT/signature, mkenvimage and fw_printenv enabled; mkimage and dumpimage not installed on target.
output/.config:1375-1382, output/.config:4066-4069
Version and patches
NVD range: U-Boot before 2025.01-rc1; upstream fix is commit 35f75d2a46e5 ("fs/ext4: Prevent overflow in ext4fs_read_symlink"), first in v2025.01-rc1. The 2024.04 source in this tree is inside the affected range and does not contain the fix hunk (fs/ext4/ext4_common.c:2197 is unchanged). Applied patches (output/build/uboot-tools-2024.04/.applied_patches_list): 0001-drop-configh-from-tools, 0002-tools-only-in-no-dot-config-targets, 0003-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS - none address this CVE. However the affected file is not part of the tools-only/envtools build, so the vulnerable code is not compiled into any produced binary.
Recommendation
Document as not applicable: the uboot-tools package only builds the host/target utility programs (fit_check_sign, mkenvimage, fw_printenv), and the ext4 filesystem driver in fs/ext4/ is never compiled by the tools-only and envtools make targets. No upgrade or backport is needed for this CVE on account of uboot-tools. Consider adding CVE-2024-57256 to an UBOOT_TOOLS_IGNORE_CVES entry (along with the other U-Boot fs/ CVEs from the same batch) so it stops matching.
If a board configuration that does build the U-Boot bootloader (BR2_TARGET_UBOOT=y) with CONFIG_FS_EXT4 is added later, this CVE must be re-evaluated for that uboot package, not uboot-tools.
Open questions
No object files or build log remain in output/build/uboot-tools-2024.04/ (only .stamp_* files), so the conclusion rests on the make targets and tools/Makefile object lists rather than an observed compile; this is unambiguous from the Makefiles but could not be cross-checked against a link map.
Members of Kernel Kit decide. Sign in if you are one.