bitVakt

Kernel Kit / Infix / v26.10.0latest

CVE-2024-57259

6.8medium

uboot-tools2024.04in 4 of 4 releases

Reach uboot-tools · 8 builds in 4 of 4 releases

full reviewcross-check✓ a member decided

Description · NVD

sqfs_search_dir in Das U-Boot before 2025.01-rc1 exhibits an off-by-one error and resultant heap memory corruption for squashfs directory listing because the path separator is not considered in a size calculation.

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

References 3
Review Av26.10.0x86_64Not affected✓ accepted by a member, 2026-11-12 · settles 8 of 8

Fable 5.1 · high confidence · 2026-11-05

The vulnerable code is present in the unpacked source (fs/squashfs/sqfs.c in the 2024.04 tarball still has the strlen(rem) + strlen(target) + 1 allocation that upstream commit 048d795b changes to + 2), and none of the three Buildroot patches touch it.

However, the uboot-tools package only builds the tools-only and envtools make targets (host-style userspace utilities: fit_check_sign, mkenvimage, fw_printenv), and the squashfs filesystem driver is never compiled: tools/Makefile has no reference to fs/squashfs, tools/generated/ contains only lib/, boot/ and common/ sources, and the built and installed binaries contain no sqfs/squashfs strings.

The U-Boot bootloader itself (BR2_TARGET_UBOOT) is not built for this x86_64 image, so the sqfs_search_dir code path does not exist anywhere in the product.

Evidence 9
  1. Unfixed vulnerable hunk: `res = malloc(strlen(rem) + strlen(target) + 1);` (upstream fix 048d795b makes this +2 for the '/' separator) - source is pre-fix, no backport

    output/build/uboot-tools-2024.04/fs/squashfs/sqfs.c:555

  2. Only 0001-drop-configh-from-tools, 0002-tools-only-in-no-dot-config-targets, 0003-tools-Makefile-fix-C-LD-FLAGS; none touch fs/squashfs

    output/build/uboot-tools-2024.04/.applied_patches_list

  3. Build runs only `make ... tools-only` and `make ... envtools`; the U-Boot firmware image (which contains the fs/ drivers) is never built

    buildroot/package/uboot-tools/uboot-tools.mk UBOOT_TOOLS_BUILD_CMDS

  4. hostprogs object lists (mkenvimage-objs, dumpimage-mkimage-objs, fit_check_sign-objs) reference only tools/*.o and generated/lib|boot|common; no fs/squashfs objects

    output/build/uboot-tools-2024.04/tools/Makefile:63-158

  5. Only lib/*.c, boot/*.c, common/hash.c were pulled in for compilation; no fs/ sources

    output/build/uboot-tools-2024.04/tools/generated/

  6. grep -c for 'sqfs|squashfs' returns 0 in all built binaries

    output/build/uboot-tools-2024.04/tools/fit_check_sign, tools/env/fw_printenv, tools/mkenvimage

  7. The only uboot-tools artifacts installed on the target; none contain squashfs code

    output/target/usr/bin/fit_check_sign, usr/bin/mkenvimage, usr/sbin/fw_printenv, usr/sbin/fw_setenv

  8. # BR2_TARGET_UBOOT is not set - the U-Boot bootloader is not built for this x86_64 image

    output/.config:3998

  9. uboot-tools selected as target package with FIT/FIT_SIGNATURE/FIT_CHECK_SIGN/MKENVIMAGE/FWPRINTENV only; MKIMAGE and DUMPIMAGE not installed

    output/.config:1423-1430 and configs/x86_64_defconfig:46-50

Version and patches

NVD range: U-Boot before 2025.01-rc1; fixed by upstream commit 048d795bb5b3d9c5701b4855f5e74bcf6849bf5e (fs/squashfs: fix heap overflow in sqfs_search_dir). Our source 2024.04 is in the affected range and the fix is NOT present in fs/squashfs/sqfs.c; none of the three Buildroot patches address it. However, the affected file is not compiled by the tools-only/envtools targets used by the uboot-tools package, so the vulnerable code is not in any built or shipped binary.

Recommendation

No action required; document as N/A for the x86_64 image (squashfs driver not compiled; only FIT-signature and environment userspace tools are built; U-Boot bootloader not built). Consider adding a Buildroot IGNORE_CVES-style note. Re-evaluate for any Infix target that sets BR2_TARGET_UBOOT with CONFIG_FS_SQUASHFS.

Open questions

No compiled object files (.o/.cmd) remain in the build directory, so compilation set was inferred from tools/Makefile, tools/generated/ contents, and string inspection of the final binaries rather than from compiler logs. Other Infix board targets (ARM boards with BR2_TARGET_UBOOT) were not reviewed and may be affected separately.

Members of Kernel Kit decide. Sign in if you are one.