| Summary: | Busybox md5sum fails to support backslashes in filenames | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Nils Rennebarth <nils.rennebarth> |
| Component: | Other | Assignee: | unassigned |
| Status: | NEW --- | ||
| Severity: | normal | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.33.x | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Nils Rennebarth
2021-09-23 12:54:20 UTC
The same behavior applies to sha256sum -c For example (taken out of https://github.com/osresearch/heads/pull/1262#issuecomment-1377744973) cd /boot mkdir "$(echo -e 'hidden dir\b\b\b\b\b\b\b\b\b\bshowed dir')" cd *hidden* touch "$(echo -e 'file with newline\ncharacter')" touch "file with textual new\nline" find ./ -type f ! -path './kexec*' -print0 | xargs -0 sha256sum > /tmp/test sha256sum -c /tmp/test | grep -v 'OK' sha256sum: can't open './showed dir/file with newline': No such file or directory ./showed dir/file with newline: FAILED sha256sum: WARNING: 2 of 340 computed checksums did NOT match cat /tmp/test (exerpt) e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./showed dir/file with textual new\nline e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./showed dir/file with newline character cat /tmp/test | grep show e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./showed dir/file with textual new\nline e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./showed dir/file with newline ls (exerpt) hidden dir??????????showed dir /boot # cd *hidden* /boot/showed dir # ls file with newline?character file with textual new\nline ---- This impacts more than mda5/sha256: this extends to ls and other busybox applets |