From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 03 15:27:24 2010 Received: (at submit) by debbugs.gnu.org; 3 Oct 2010 19:27:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P2UDT-0001IP-AJ for submit@debbugs.gnu.org; Sun, 03 Oct 2010 15:27:24 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P2U86-0001GC-Pu for submit@debbugs.gnu.org; Sun, 03 Oct 2010 15:21:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2UB4-0003Ok-27 for submit@debbugs.gnu.org; Sun, 03 Oct 2010 15:24:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:40008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2UB3-0003Og-TC for submit@debbugs.gnu.org; Sun, 03 Oct 2010 15:24:54 -0400 Received: from [140.186.70.92] (port=49971 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2UB2-0004NN-Fj for bug-coreutils@gnu.org; Sun, 03 Oct 2010 15:24:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2UB1-0003OQ-BS for bug-coreutils@gnu.org; Sun, 03 Oct 2010 15:24:52 -0400 Received: from sonata.lmta.lt ([193.219.48.156]:41894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2UB1-0003Nc-4w for bug-coreutils@gnu.org; Sun, 03 Oct 2010 15:24:51 -0400 Received: from 78-56-241-112.static.zebra.lt ([78.56.241.112] helo=[192.168.1.10]) by sonata.lmta.lt with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P2UAq-0001L8-6G; Sun, 03 Oct 2010 22:24:41 +0300 Message-ID: <4CA8D86F.9000505@rq.lt> Date: Sun, 03 Oct 2010 22:24:31 +0300 From: Rimas Kudelis User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0b7pre) Gecko/20100930 Thunderbird/3.3a1pre MIME-Version: 1.0 To: bug-coreutils@gnu.org X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=windows-1257 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 78.56.241.112 X-SA-Exim-Mail-From: rq@rq.lt Subject: [md5sum] does not accept X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:20:07 +0000) X-SA-Exim-Scanned: Yes (on sonata.lmta.lt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 03 Oct 2010 15:27:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Hi, I have a little problem with md5sum. A FreeBSD box generates an md5 sum of a file, which I'm later trying to check on a Linux box. The problem is that what FreeBSD's md5 outputs is slightly different from what Linux's md5sum expects, which makes md5sum complain. The difference is really trivial: md5 outputs one space between the sum and the file name, and md5sum outputs/expects two: rq@garage:~/Pootle/tmp$ md5sum -c catkeys.zip md5sum: catkeys.zip: no properly formatted MD5 checksum lines found rq@garage:~/Pootle/tmp$ md5sum -c catkeys.zip.md5 md5sum: catkeys.zip.md5: no properly formatted MD5 checksum lines found rq@garage:~/Pootle/tmp$ md5sum catkeys.zip f653761af3137c8a631284b390bae102 catkeys.zip rq@garage:~/Pootle/tmp$ cat catkeys.zip.md5 f653761af3137c8a631284b390bae102 catkeys.zip I don't know which format is the "right" one, but could md5sum perhaps be fixed to support md5's checksum files too? Thanks! Rimas Kudelis From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 03 18:25:29 2010 Received: (at 7155) by debbugs.gnu.org; 3 Oct 2010 22:25:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P2Wzp-0002NL-AJ for submit@debbugs.gnu.org; Sun, 03 Oct 2010 18:25:29 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1P2Wzn-0002NG-9x for 7155@debbugs.gnu.org; Sun, 03 Oct 2010 18:25:28 -0400 Received: (qmail 21775 invoked from network); 3 Oct 2010 22:28:30 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 3 Oct 2010 22:28:30 -0000 Message-ID: <4CA9034C.6010309@draigBrady.com> Date: Sun, 03 Oct 2010 23:27:24 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Rimas Kudelis Subject: Re: bug#7155: [md5sum] does not accept References: <4CA8D86F.9000505@rq.lt> In-Reply-To: <4CA8D86F.9000505@rq.lt> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7155 Cc: 7155@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) On 03/10/10 20:24, Rimas Kudelis wrote: > Hi, > > I have a little problem with md5sum. > > A FreeBSD box generates an md5 sum of a file, which I'm later trying to > check on a Linux box. The problem is that what FreeBSD's md5 outputs is > slightly different from what Linux's md5sum expects, which makes md5sum > complain. The difference is really trivial: md5 outputs one space > between the sum and the file name, and md5sum outputs/expects two: md5 seems to output a different format here. $ head -n1 /etc/motd FreeBSD 8.0-RELEASE-p3 (GENERIC) #0: Wed May 26 05:45:12 UTC 2010 $ md5sum --version | head -n1 md5sum (GNU coreutils) 8.3 $ md5 file | tee t.md5 MD5 (file) = b85d6fb9ef4260dcf1ce0a1b0bff80d3 $ md5sum -c t.md5 file: OK Could you verify what md5 utility you're using exactly. cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 16 15:33:30 2010 Received: (at 7155) by debbugs.gnu.org; 16 Oct 2010 19:33:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7CVV-0004jO-QR for submit@debbugs.gnu.org; Sat, 16 Oct 2010 15:33:30 -0400 Received: from sonata.lmta.lt ([193.219.48.156]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7CVS-0004jJ-Qc for 7155@debbugs.gnu.org; Sat, 16 Oct 2010 15:33:27 -0400 Received: from www-data by sonata.lmta.lt with local (Exim 4.69) (envelope-from ) id 1P7CYv-0008Tv-Q9; Sat, 16 Oct 2010 22:37:01 +0300 To: =?UTF-8?Q?P=C3=A1draig_Brady?= Subject: Re: bug#7155: [md5sum] does not accept MIME-Version: 1.0 Date: Sat, 16 Oct 2010 22:37:01 +0300 From: Rimas Kudelis In-Reply-To: <4CA9034C.6010309@draigBrady.com> References: <4CA8D86F.9000505@rq.lt> <4CA9034C.6010309@draigBrady.com> Message-ID: X-Sender: rq@rq.lt User-Agent: RoundCube Webmail/0.3.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="UTF-8" X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: rq@rq.lt X-SA-Exim-Scanned: No (on sonata.lmta.lt); SAEximRunCond expanded to false X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 7155 Cc: 7155@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On Sun, 03 Oct 2010 23:27:24 +0100, Pádraig Brady wrote: > On 03/10/10 20:24, Rimas Kudelis wrote: >> Hi, >> >> I have a little problem with md5sum. >> >> A FreeBSD box generates an md5 sum of a file, which I'm later trying to >> check on a Linux box. The problem is that what FreeBSD's md5 outputs is >> slightly different from what Linux's md5sum expects, which makes md5sum >> complain. The difference is really trivial: md5 outputs one space >> between the sum and the file name, and md5sum outputs/expects two: > > md5 seems to output a different format here. > > $ head -n1 /etc/motd > FreeBSD 8.0-RELEASE-p3 (GENERIC) #0: Wed May 26 05:45:12 UTC 2010 > $ md5sum --version | head -n1 > md5sum (GNU coreutils) 8.3 > $ md5 file | tee t.md5 > MD5 (file) = b85d6fb9ef4260dcf1ce0a1b0bff80d3 > $ md5sum -c t.md5 > file: OK > > Could you verify what md5 utility you're using exactly. Sorry for taking so long to answer, but I wasn't the person producing the checksum, so I had to ask too. The command used to produce the checksum is: $ md5 -r FreeBSD release version is the same as yours. I've just tested the same command with FreeBSD 6.2, and it only outputs one space too. Rimas From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 16 18:36:01 2010 Received: (at 7155) by debbugs.gnu.org; 16 Oct 2010 22:36:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7FM8-0005yp-Bc for submit@debbugs.gnu.org; Sat, 16 Oct 2010 18:36:00 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1P7FM6-0005yi-0Y for 7155@debbugs.gnu.org; Sat, 16 Oct 2010 18:35:58 -0400 Received: (qmail 62015 invoked from network); 16 Oct 2010 22:39:35 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 16 Oct 2010 22:39:35 -0000 Message-ID: <4CBA2926.4000906@draigBrady.com> Date: Sat, 16 Oct 2010 23:37:26 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Rimas Kudelis Subject: Re: bug#7155: [md5sum] does not accept References: <4CA8D86F.9000505@rq.lt> <4CA9034C.6010309@draigBrady.com> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7155 Cc: 7155@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) On 16/10/10 20:37, Rimas Kudelis wrote: > > On Sun, 03 Oct 2010 23:27:24 +0100, Pádraig Brady > wrote: >> On 03/10/10 20:24, Rimas Kudelis wrote: >>> Hi, >>> >>> I have a little problem with md5sum. >>> >>> A FreeBSD box generates an md5 sum of a file, which I'm later trying to >>> check on a Linux box. The problem is that what FreeBSD's md5 outputs is >>> slightly different from what Linux's md5sum expects, which makes md5sum >>> complain. The difference is really trivial: md5 outputs one space >>> between the sum and the file name, and md5sum outputs/expects two: >> >> md5 seems to output a different format here. >> >> $ head -n1 /etc/motd >> FreeBSD 8.0-RELEASE-p3 (GENERIC) #0: Wed May 26 05:45:12 UTC 2010 >> $ md5sum --version | head -n1 >> md5sum (GNU coreutils) 8.3 >> $ md5 file | tee t.md5 >> MD5 (file) = b85d6fb9ef4260dcf1ce0a1b0bff80d3 >> $ md5sum -c t.md5 >> file: OK >> >> Could you verify what md5 utility you're using exactly. > > > Sorry for taking so long to answer, but I wasn't the person producing the > checksum, so I had to ask too. The command used to produce the checksum is: > $ md5 -r > > FreeBSD release version is the same as yours. I've just tested the same > command with FreeBSD 6.2, and it only outputs one space too. Ah right, md5 -r produces the alternate format. I suppose we could support a single space, by trying to open("*abc") after trying to open ("abc"). There is still an ambiguity if both files are present, though that is unlikely. I'll have a look. cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 14 08:39:55 2011 Received: (at 7155) by debbugs.gnu.org; 14 Sep 2011 12:39:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3oks-0001i0-Ph for submit@debbugs.gnu.org; Wed, 14 Sep 2011 08:39:55 -0400 Received: from mail1.vodafone.ie ([213.233.128.43]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3okp-0001hr-F3 for 7155@debbugs.gnu.org; Wed, 14 Sep 2011 08:39:53 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAOWecE5tTE0y/2dsb2JhbAAMNYRVpXABAQUjDwFGEAsNAQoCAgUWCwICCQMCAQIBRQYNAQUCAQGsOZF4gSyEMYERBJh5i2w Received: from unknown (HELO [192.168.1.79]) ([109.76.77.50]) by mail1.vodafone.ie with ESMTP; 14 Sep 2011 13:35:17 +0100 Message-ID: <4E709F81.7090606@draigBrady.com> Date: Wed, 14 Sep 2011 13:35:13 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 MIME-Version: 1.0 To: Rimas Kudelis Subject: Re: bug#7155: [md5sum] does not accept References: <4CA8D86F.9000505@rq.lt> <4CA9034C.6010309@draigBrady.com> <4CBA2926.4000906@draigBrady.com> In-Reply-To: <4CBA2926.4000906@draigBrady.com> X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 7155 Cc: 7155@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) severity 7155 wishlist tags 7155 + notabug Comments below. On 10/16/2010 11:37 PM, Pádraig Brady wrote: > On 16/10/10 20:37, Rimas Kudelis wrote: >> >> On Sun, 03 Oct 2010 23:27:24 +0100, Pádraig Brady >> wrote: >>> On 03/10/10 20:24, Rimas Kudelis wrote: >>>> Hi, >>>> >>>> I have a little problem with md5sum. >>>> >>>> A FreeBSD box generates an md5 sum of a file, which I'm later trying to >>>> check on a Linux box. The problem is that what FreeBSD's md5 outputs is >>>> slightly different from what Linux's md5sum expects, which makes md5sum >>>> complain. The difference is really trivial: md5 outputs one space >>>> between the sum and the file name, and md5sum outputs/expects two: >>> >>> md5 seems to output a different format here. >>> >>> $ head -n1 /etc/motd >>> FreeBSD 8.0-RELEASE-p3 (GENERIC) #0: Wed May 26 05:45:12 UTC 2010 >>> $ md5sum --version | head -n1 >>> md5sum (GNU coreutils) 8.3 >>> $ md5 file | tee t.md5 >>> MD5 (file) = b85d6fb9ef4260dcf1ce0a1b0bff80d3 >>> $ md5sum -c t.md5 >>> file: OK >>> >>> Could you verify what md5 utility you're using exactly. >> >> >> Sorry for taking so long to answer, but I wasn't the person producing the >> checksum, so I had to ask too. The command used to produce the checksum is: >> $ md5 -r >> >> FreeBSD release version is the same as yours. I've just tested the same >> command with FreeBSD 6.2, and it only outputs one space too. > > Ah right, md5 -r produces the alternate format. > I suppose we could support a single space, > by trying to open("*abc") after trying to open ("abc"). > There is still an ambiguity if both files are present, > though that is unlikely. I'll have a look. Thinking more about this, there is a bit of a security issue with mixing both formats. Consider the case currently with a checksum in BSD format of ' important_file' (with leading space). b85d6fb9ef4260dcf1ce0a1b0bff80d3 important_file Now an attacker does: mv ' important_file' important_file cp trojan ' important_file' And since coreutils will check 'important_file' first, then we'll not report any errors. If coreutils supported both formats then this would be compounded. I suppose we could mitigate that somewhat by detecting and supporting only a single format per run, as done in the following diff. Note we don't handle the case where the first or only entry in a BSD format checksum file has a file name with a leading ' ' or '*'. We could support this and avoid detection with an option to specify BSD format checksums, but I don't think that's warranted. Note we could detect in this situation too by retrying the open with the leading char included, but that would introduce a security issue. Consider the following standard format checksum file: b85d6fb9ef4260dcf1ce0a1b0bff80d3 firewall_rules Attackers could then do this undetected: mv firewall_rules ' firewall_rules' cheers, Pádraig. diff --git a/src/md5sum.c b/src/md5sum.c index ff9538a..9de34a5 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -99,7 +99,7 @@ not include any newline character at the end of a line. */ #define MIN_DIGEST_LINE_LENGTH \ (DIGEST_HEX_BYTES /* length of hexadecimal message digest */ \ - + 2 /* blank and binary indicator */ \ + + 1 /* blank */ \ + 1 /* minimum filename length */ ) /* True if any of the files read were the standard input. */ @@ -126,6 +126,9 @@ static bool quiet = false; improperly formatted. */ static bool strict = false; +/* Whether a BSD reversed format checksum is detected. */ +static int bsd_reversed = -1; + /* For long options that have no equivalent short option, use a non-character as a pseudo short option, starting with CHAR_MAX + 1. */ enum @@ -307,9 +310,24 @@ split_3 (char *s, size_t s_len, s[i++] = '\0'; - if (s[i] != ' ' && s[i] != '*') - return false; - *binary = (s[i++] == '*'); + /* If "bsd reversed" format detected. */ + if ((s_len - i == 1) || (s[i] != ' ' && s[i] != '*')) + { + /* Don't allow mixing bsd and standard formats, + to minimize security issues with attackers + renaming files with leading spaces. + This assumes that with bsd format checksums + that the first file name does not have + a leading ' ' or '*'. */ + if (bsd_reversed == 0) + return false; + bsd_reversed = 1; + } + else if (bsd_reversed != 1) + { + bsd_reversed = 0; + *binary = (s[i++] == '*'); + } /* All characters between the type indicator and end of line are significant -- that includes leading and trailing white space. */ From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 14 10:17:38 2011 Received: (at 7155) by debbugs.gnu.org; 14 Sep 2011 14:17:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3qHS-0001H5-2x for submit@debbugs.gnu.org; Wed, 14 Sep 2011 10:17:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3qHO-0001Gw-91 for 7155@debbugs.gnu.org; Wed, 14 Sep 2011 10:17:36 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8EED0ul021964 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Sep 2011 10:13:00 -0400 Received: from mx.meyering.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8EECxI9013567; Wed, 14 Sep 2011 10:12:59 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 9ABF66044D; Wed, 14 Sep 2011 16:12:58 +0200 (CEST) From: Jim Meyering To: =?iso-8859-1?Q?P=E1draig?= Brady Subject: Re: bug#7155: [md5sum] does not accept In-Reply-To: <4E709F81.7090606@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?= =?iso-8859-1?Q?g?= Brady"'s message of "Wed, 14 Sep 2011 13:35:13 +0100") References: <4CA8D86F.9000505@rq.lt> <4CA9034C.6010309@draigBrady.com> <4CBA2926.4000906@draigBrady.com> <4E709F81.7090606@draigBrady.com> Date: Wed, 14 Sep 2011 16:12:58 +0200 Message-ID: <87fwjzw6tx.fsf@rho.meyering.net> Lines: 90 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -10.5 (----------) X-Debbugs-Envelope-To: 7155 Cc: 7155@debbugs.gnu.org, Rimas Kudelis X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.5 (----------) P=E1draig Brady wrote: > severity 7155 wishlist > tags 7155 + notabug > > Comments below. > > On 10/16/2010 11:37 PM, P=E1draig Brady wrote: >> On 16/10/10 20:37, Rimas Kudelis wrote: >>> >>> On Sun, 03 Oct 2010 23:27:24 +0100, P=E1draig Brady >>> wrote: >>>> On 03/10/10 20:24, Rimas Kudelis wrote: >>>>> Hi, >>>>> >>>>> I have a little problem with md5sum. >>>>> >>>>> A FreeBSD box generates an md5 sum of a file, which I'm later trying = to >>>>> check on a Linux box. The problem is that what FreeBSD's md5 outputs = is >>>>> slightly different from what Linux's md5sum expects, which makes md5s= um >>>>> complain. The difference is really trivial: md5 outputs one space >>>>> between the sum and the file name, and md5sum outputs/expects two: >>>> >>>> md5 seems to output a different format here. >>>> >>>> $ head -n1 /etc/motd >>>> FreeBSD 8.0-RELEASE-p3 (GENERIC) #0: Wed May 26 05:45:12 UTC 2010 >>>> $ md5sum --version | head -n1 >>>> md5sum (GNU coreutils) 8.3 >>>> $ md5 file | tee t.md5 >>>> MD5 (file) =3D b85d6fb9ef4260dcf1ce0a1b0bff80d3 >>>> $ md5sum -c t.md5 >>>> file: OK >>>> >>>> Could you verify what md5 utility you're using exactly. >>> >>> >>> Sorry for taking so long to answer, but I wasn't the person producing t= he >>> checksum, so I had to ask too. The command used to produce the checksum= is: >>> $ md5 -r >>> >>> FreeBSD release version is the same as yours. I've just tested the same >>> command with FreeBSD 6.2, and it only outputs one space too. >> >> Ah right, md5 -r produces the alternate format. >> I suppose we could support a single space, >> by trying to open("*abc") after trying to open ("abc"). >> There is still an ambiguity if both files are present, >> though that is unlikely. I'll have a look. > > Thinking more about this, there is a bit of a > security issue with mixing both formats. > Consider the case currently with a checksum in BSD format > of ' important_file' (with leading space). > > b85d6fb9ef4260dcf1ce0a1b0bff80d3 important_file > > Now an attacker does: > > mv ' important_file' important_file > cp trojan ' important_file' > > And since coreutils will check 'important_file' first, > then we'll not report any errors. > > If coreutils supported both formats then this would be compounded. > I suppose we could mitigate that somewhat by detecting and > supporting only a single format per run, as done in the following diff. > > Note we don't handle the case where the first or only > entry in a BSD format checksum file has a file name with a > leading ' ' or '*'. We could support this and avoid detection > with an option to specify BSD format checksums, but > I don't think that's warranted. Note we could detect > in this situation too by retrying the open with the > leading char included, but that would introduce a security > issue. Consider the following standard format checksum file: > > b85d6fb9ef4260dcf1ce0a1b0bff80d3 firewall_rules > > Attackers could then do this undetected: > > mv firewall_rules ' firewall_rules' Good point. I don't see a way to make GNU md5sum handle this automatically and safely. However, that's not a big deal: it's easy to convert from one format to the other using sed or perl. I'd be inclined to mark this "wontfix" (because we cannot) or simply to close it. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 14 11:17:57 2011 Received: (at 7155) by debbugs.gnu.org; 14 Sep 2011 15:17:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3rDo-000603-JU for submit@debbugs.gnu.org; Wed, 14 Sep 2011 11:17:57 -0400 Received: from mail1.vodafone.ie ([213.233.128.43]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3rDl-0005zs-OF for 7155@debbugs.gnu.org; Wed, 14 Sep 2011 11:17:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAFPEcE5tTE0y/2dsb2JhbAAMNaoyAQEFMgFGEAsNCwkWDwkDAgECAUUGDQEFAgEBvVmGbgSYeYts Received: from unknown (HELO [192.168.1.79]) ([109.76.77.50]) by mail1.vodafone.ie with ESMTP; 14 Sep 2011 16:13:03 +0100 Message-ID: <4E70C47F.4030604@draigBrady.com> Date: Wed, 14 Sep 2011 16:13:03 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 MIME-Version: 1.0 To: Jim Meyering Subject: Re: bug#7155: [md5sum] does not accept References: <4CA8D86F.9000505@rq.lt> <4CA9034C.6010309@draigBrady.com> <4CBA2926.4000906@draigBrady.com> <4E709F81.7090606@draigBrady.com> <87fwjzw6tx.fsf@rho.meyering.net> In-Reply-To: <87fwjzw6tx.fsf@rho.meyering.net> X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 7155 Cc: 7155@debbugs.gnu.org, Rimas Kudelis X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 09/14/2011 03:12 PM, Jim Meyering wrote: > Pádraig Brady wrote: >> severity 7155 wishlist >> tags 7155 + notabug >> >> Comments below. >> >> On 10/16/2010 11:37 PM, Pádraig Brady wrote: >>> On 16/10/10 20:37, Rimas Kudelis wrote: >>>> >>>> On Sun, 03 Oct 2010 23:27:24 +0100, Pádraig Brady >>>> wrote: >>>>> On 03/10/10 20:24, Rimas Kudelis wrote: >>>>>> Hi, >>>>>> >>>>>> I have a little problem with md5sum. >>>>>> >>>>>> A FreeBSD box generates an md5 sum of a file, which I'm later trying to >>>>>> check on a Linux box. The problem is that what FreeBSD's md5 outputs is >>>>>> slightly different from what Linux's md5sum expects, which makes md5sum >>>>>> complain. The difference is really trivial: md5 outputs one space >>>>>> between the sum and the file name, and md5sum outputs/expects two: >>>>> >>>>> md5 seems to output a different format here. >>>>> >>>>> $ head -n1 /etc/motd >>>>> FreeBSD 8.0-RELEASE-p3 (GENERIC) #0: Wed May 26 05:45:12 UTC 2010 >>>>> $ md5sum --version | head -n1 >>>>> md5sum (GNU coreutils) 8.3 >>>>> $ md5 file | tee t.md5 >>>>> MD5 (file) = b85d6fb9ef4260dcf1ce0a1b0bff80d3 >>>>> $ md5sum -c t.md5 >>>>> file: OK >>>>> >>>>> Could you verify what md5 utility you're using exactly. >>>> >>>> >>>> Sorry for taking so long to answer, but I wasn't the person producing the >>>> checksum, so I had to ask too. The command used to produce the checksum is: >>>> $ md5 -r >>>> >>>> FreeBSD release version is the same as yours. I've just tested the same >>>> command with FreeBSD 6.2, and it only outputs one space too. >>> >>> Ah right, md5 -r produces the alternate format. >>> I suppose we could support a single space, >>> by trying to open("*abc") after trying to open ("abc"). >>> There is still an ambiguity if both files are present, >>> though that is unlikely. I'll have a look. >> >> Thinking more about this, there is a bit of a >> security issue with mixing both formats. >> Consider the case currently with a checksum in BSD format >> of ' important_file' (with leading space). >> >> b85d6fb9ef4260dcf1ce0a1b0bff80d3 important_file >> >> Now an attacker does: >> >> mv ' important_file' important_file >> cp trojan ' important_file' >> >> And since coreutils will check 'important_file' first, >> then we'll not report any errors. >> >> If coreutils supported both formats then this would be compounded. >> I suppose we could mitigate that somewhat by detecting and >> supporting only a single format per run, as done in the following diff. >> >> Note we don't handle the case where the first or only >> entry in a BSD format checksum file has a file name with a >> leading ' ' or '*'. We could support this and avoid detection >> with an option to specify BSD format checksums, but >> I don't think that's warranted. Note we could detect >> in this situation too by retrying the open with the >> leading char included, but that would introduce a security >> issue. Consider the following standard format checksum file: >> >> b85d6fb9ef4260dcf1ce0a1b0bff80d3 firewall_rules >> >> Attackers could then do this undetected: >> >> mv firewall_rules ' firewall_rules' > > Good point. > I don't see a way to make GNU md5sum handle this automatically > and safely. However, that's not a big deal: it's easy to > convert from one format to the other using sed or perl. > > I'd be inclined to mark this "wontfix" (because we cannot) > or simply to close it. Yes, it's debatable. To summarize, the only caveat with my patch I think is that it will give a false error for BSD format checksums where the first entry has a file name starting with ' ' or '*'. That should be exceedingly rare though, and is a lot better than a false OK. Also in this case even without the patch, we're susceptible to the 'trojan' case above. The workaround is easy as you suggest: sed 's/ / /' files.md5 | md5sum -c However that is not easily discoverable. I'm 50:50, so I'll think a bit more. Hmm I might just document in info that the checksum utilities are compatible with the BSD ones when processed like: md5 -r files... | sed 's/ / /' > files.md5 cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 14 18:45:45 2011 Received: (at 7155) by debbugs.gnu.org; 14 Sep 2011 22:45:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3yDA-0005hY-LK for submit@debbugs.gnu.org; Wed, 14 Sep 2011 18:45:44 -0400 Received: from sonata.lmta.lt ([193.219.48.156]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3yD5-0005ef-MD for 7155@debbugs.gnu.org; Wed, 14 Sep 2011 18:45:41 -0400 Received: from 78-56-241-112.static.zebra.lt ([78.56.241.112] helo=[192.168.1.102]) by sonata.lmta.lt with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1R3y8H-0004C5-EJ; Thu, 15 Sep 2011 01:40:42 +0300 Message-ID: <4E712E06.9030702@rq.lt> Date: Thu, 15 Sep 2011 01:43:18 +0300 From: Rimas Kudelis User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0) Gecko/20110905 Thunderbird/7.0 MIME-Version: 1.0 To: Jim Meyering , 7155@debbugs.gnu.org References: <4CA8D86F.9000505@rq.lt> <4CA9034C.6010309@draigBrady.com> <4CBA2926.4000906@draigBrady.com> <4E709F81.7090606@draigBrady.com> <87fwjzw6tx.fsf@rho.meyering.net> In-Reply-To: <87fwjzw6tx.fsf@rho.meyering.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 78.56.241.112 X-SA-Exim-Mail-From: rq@rq.lt X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sonata.lmta.lt X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, TVD_RCVD_IP autolearn=ham version=3.3.1 Subject: Re: bug#7155: [md5sum] does not accept X-SA-Exim-Version: 4.2.1 (built Mon, 22 Mar 2010 06:26:47 +0000) X-SA-Exim-Scanned: Yes (on sonata.lmta.lt) X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: 7155 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) 2011.09.14 17:12, Jim Meyering rašė: > Good point. I don't see a way to make GNU md5sum handle this > automatically and safely. However, that's not a big deal: it's easy to > convert from one format to the other using sed or perl. I'd be > inclined to mark this "wontfix" (because we cannot) or simply to close > it. I think you could also implement this as a commandline switch, right? Rimas From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 16 03:33:56 2011 Received: (at 7155) by debbugs.gnu.org; 16 Sep 2011 07:33:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4Svs-0002QU-2R for submit@debbugs.gnu.org; Fri, 16 Sep 2011 03:33:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4Svp-0002QL-8o for 7155@debbugs.gnu.org; Fri, 16 Sep 2011 03:33:54 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8G7T9Di018246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Sep 2011 03:29:09 -0400 Received: from mx.meyering.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8G7T8j5008755; Fri, 16 Sep 2011 03:29:08 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id D6D1B60084; Fri, 16 Sep 2011 09:29:07 +0200 (CEST) From: Jim Meyering To: =?iso-8859-1?Q?P=E1draig?= Brady Subject: Re: bug#7155: [md5sum] does not accept In-Reply-To: <4E70C47F.4030604@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?= =?iso-8859-1?Q?g?= Brady"'s message of "Wed, 14 Sep 2011 16:13:03 +0100") References: <4CA8D86F.9000505@rq.lt> <4CA9034C.6010309@draigBrady.com> <4CBA2926.4000906@draigBrady.com> <4E709F81.7090606@draigBrady.com> <87fwjzw6tx.fsf@rho.meyering.net> <4E70C47F.4030604@draigBrady.com> Date: Fri, 16 Sep 2011 09:29:07 +0200 Message-ID: <87ty8d6j3w.fsf@rho.meyering.net> Lines: 30 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -10.5 (----------) X-Debbugs-Envelope-To: 7155 Cc: 7155@debbugs.gnu.org, Rimas Kudelis X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.5 (----------) P=E1draig Brady wrote: > To summarize, the only caveat with my patch I think is that > it will give a false error for BSD format checksums > where the first entry has a file name starting with ' ' or '*'. > That should be exceedingly rare though, and is a lot better > than a false OK. Oh. I misunderstood. We already accept one BSD variant: MD5 (f) =3D d41d8cd98f00b204e9800998ecf8427e so I guess it's hard to reject another. > Also in this case even without the patch, we're susceptible > to the 'trojan' case above. > > The workaround is easy as you suggest: > > sed 's/ / /' files.md5 | md5sum -c > > However that is not easily discoverable. > I'm 50:50, so I'll think a bit more. > Hmm I might just document in info that > the checksum utilities are compatible with > the BSD ones when processed like: > > md5 -r files... | sed 's/ / /' > files.md5 Whichever you prefer. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 16 08:59:10 2011 Received: (at 7155-done) by debbugs.gnu.org; 16 Sep 2011 12:59:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4Y0b-00017Z-V0 for submit@debbugs.gnu.org; Fri, 16 Sep 2011 08:59:10 -0400 Received: from mail2.vodafone.ie ([213.233.128.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4Y0V-00017N-Vd for 7155-done@debbugs.gnu.org; Fri, 16 Sep 2011 08:59:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAINGc05tTfwU/2dsb2JhbAAMNoRVpVgBAQUjVhAJAg0BAwMBAgEJFgsCAgIHAwIBAgE9CAYNAQUCAQEFEasYkWaFZ4ERBJkFhFeHGg Received: from unknown (HELO [192.168.1.79]) ([109.77.252.20]) by mail2.vodafone.ie with ESMTP; 16 Sep 2011 13:54:18 +0100 Message-ID: <4E7346F9.6070701@draigBrady.com> Date: Fri, 16 Sep 2011 13:54:17 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Rimas Kudelis Subject: Re: bug#7155: [md5sum] does not accept References: <4CA8D86F.9000505@rq.lt> <4CA9034C.6010309@draigBrady.com> <4CBA2926.4000906@draigBrady.com> <4E709F81.7090606@draigBrady.com> <87fwjzw6tx.fsf@rho.meyering.net> <4E712E06.9030702@rq.lt> In-Reply-To: <4E712E06.9030702@rq.lt> X-Enigmail-Version: 1.3.1 Content-Type: multipart/mixed; boundary="------------060201030407000301020200" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 7155-done Cc: 7155-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) This is a multi-part message in MIME format. --------------060201030407000301020200 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 09/14/2011 11:43 PM, Rimas Kudelis wrote: > 2011.09.14 17:12, Jim Meyering rašė: >> Good point. I don't see a way to make GNU md5sum handle this automatically and safely. However, that's not a big deal: it's easy to convert from one format to the other using sed or perl. I'd be inclined to mark this "wontfix" (because we cannot) or simply to close it. > > > I think you could also implement this as a commandline switch, right? Right. But that complicates the interface unnecessarily I think. I'm going to apply the attached to give automatic support, with the aforementioned caveat that BSD -r format checksums where the _first_ file starts with a ' ' or '*' are not supported. In that very unlikely case, one can always preprocess with sed 's/ / /' cheers, Pádraig. --------------060201030407000301020200 Content-Type: text/plain; name="md5sum-bsd.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="md5sum-bsd.diff" RnJvbSAyOTkwNGY5MDdiZmEyMmM4NDkyMTc2YTBlNmMyYmI2NWRlYWMwZTliIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/UD1DMz1BMWRyYWlnPTIwQnJhZHk/ PSA8UEBkcmFpZ0JyYWR5LmNvbT4KRGF0ZTogRnJpLCAxNiBTZXAgMjAxMSAxMTo0NzozNSAr MDEwMApTdWJqZWN0OiBbUEFUQ0hdIG1kNXN1bTogaGFuZGxlIEJTRCByZXZlcnNlZCBmb3Jt YXQgY2hlY2tzdW1zCgoqIHNyYy9tZDVzdW0uYyAoc3BsaXRfMyk6IERldGVjdCBhbmQgaGFu ZGxlIEJTRCByZXZlcnNlZApmb3JtYXQgY2hlY2tzdW1zLgoqIHRlc3RzL21pc2MvbWQ1c3Vt LWJzZDogQWRkIGEgbmV3IHRlc3QuCiogdGVzdHMvTWFrZWZpbGUuYW06IFJlZmVyZW5jZSBu ZXcgdGVzdC4KKiBORVdTOiBNZW50aW9uIHRoZSBpbXByb3ZlbWVudApTdWdnZXN0ZWQgYnkg UmltYXMgS3VkZWxpcy4KLS0tCiBORVdTICAgICAgICAgICAgICAgICAgfCAgICA1ICsrKysr CiBzcmMvbWQ1c3VtLmMgICAgICAgICAgfCAgIDI2ICsrKysrKysrKysrKysrKysrKysrKyst LS0tCiB0ZXN0cy9NYWtlZmlsZS5hbSAgICAgfCAgICAxICsKIHRlc3RzL21pc2MvbWQ1c3Vt LWJzZCB8ICAgNDEgKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysK IDQgZmlsZXMgY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GwgYmUg ZGV0ZWN0ZWQgYXMgc3RhbmRhcmQgZm9ybWF0IGFuZCBlcnJvci4KKyMgVGhpcyB1bmxpa2Vs eSBjYXZlYXQgd2FzIHRob3VnaHQgYmV0dGVyIHRoYW4gbWFuZGF0aW5nCisjIGFuIG9wdGlv biB0byBhdm9pZCB0aGUgYW1iaWd1aXR5LgordGFpbCAtbisyIGNoZWNrLm1kNSB8IG1kNXN1 bSAtLXN0cmljdCAtYyAmJiBmYWlsPTEKKworRXhpdCAkZmFpbAotLSAKMS43LjYKCg== --------------060201030407000301020200-- From unknown Mon Jun 23 04:12:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 15 Oct 2011 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator