[Bug 14866] sha256sum reports false mismatch if input not delimited by two spaces
bugzilla at busybox.net
bugzilla at busybox.net
Sun Feb 26 15:50:11 UTC 2023
https://bugs.busybox.net/show_bug.cgi?id=14866
--- Comment #4 from Evan Carroll <me at evancarroll.com> ---
I'm currently using alpine:latest which is still running BusyBox 1.35 and it's
affected by this specific bug, but I can't find the source code or patch for
sha256sum in the BusyBox project. This was in fact very confusing. It's easy to
introduce this bug in the system with `echo`, which will take two arguments and
always use 1 space when joining them.
# sha256sum myfile.xz
8f55c5a97591f1bebdeaff02cdd0d19b8161c1bcba4f2009a7e204c57c85981b myfile.xz
# echo 8f55c5a97591f1bebdeaff02cdd0d19b8161c1bcba4f2009a7e204c57c85981b
myfile.xz
8f55c5a97591f1bebdeaff02cdd0d19b8161c1bcba4f2009a7e204c57c85981b myfile.xz
# echo 8f55c5a97591f1bebdeaff02cdd0d19b8161c1bcba4f2009a7e204c57c85981b
myfile.xz | sha256sum -c
sha256sum: WARNING: 1 of 1 computed checksums did NOT match
# echo "8f55c5a97591f1bebdeaff02cdd0d19b8161c1bcba4f2009a7e204c57c85981b
myfile.xz" | sha256sum -c
myfile.xz: OK
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list