bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Moviuro via GNU coreutils Bug Reports <bug-coreutils@gnu.org>
To: 62403@debbugs.gnu.org
Subject: bug#62403: checksums --check (sha256sum, sha1sum) return file: OK when they shouldn't
Date: Thu, 23 Mar 2023 10:32:53 +0100	[thread overview]
Message-ID: <ZBwcxT726sbnQaNB@toxoplasmosis> (raw)

Hello,

This report was first found on r/archlinux:

% echo "123" > 1
% echo "1234" > 2
% echo "abc" > 3
% sha256sum 1 2 3 > sums.sha256
% sha1sum 1 2 3 > sums.sha1
% echo "123" > 2 # break file 2

% sha256sum -c sums.sha256 # returns 2: OK (incorrect)
% sha1sum -c sums.sha1 # returns 2: OK

% tail -n 2 sums.sha256 | sha256sum -c # returns 2: FAILED (correct)
% tail -n 2 sums.sha1 | sha1sum -c # returns 2: FAILED

See https://redd.it/11zdecf .

Someone pointed at this commit, though I'm unable to confirm that:
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=b319685c6e12e66bf357c2384fe69f1c63f66aed

% sha256sum --version
sha256sum (GNU coreutils) 9.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper, Scott Miller, and David Madore.

Best regards,




             reply	other threads:[~2023-03-23  9:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23  9:32 Moviuro via GNU coreutils Bug Reports [this message]
2023-03-23 12:43 ` bug#62403: checksums --check (sha256sum, sha1sum) return file: OK when they shouldn't Pádraig Brady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZBwcxT726sbnQaNB@toxoplasmosis \
    --to=bug-coreutils@gnu.org \
    --cc=62403@debbugs.gnu.org \
    --cc=moviuro.gnu@popho.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).