From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +NppNiovVWLpBAEAgWs5BA (envelope-from ) for ; Tue, 12 Apr 2022 09:50:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UNtZLyovVWLITAEAG6o9tA (envelope-from ) for ; Tue, 12 Apr 2022 09:50:02 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 43A8B3A854 for ; Tue, 12 Apr 2022 09:50:02 +0200 (CEST) Received: from localhost ([::1]:37544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1neBHk-0002Qo-Uk for larch@yhetil.org; Tue, 12 Apr 2022 03:50:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neBFq-0000dl-6X for guix-patches@gnu.org; Tue, 12 Apr 2022 03:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1neBFp-0003wb-Sm for guix-patches@gnu.org; Tue, 12 Apr 2022 03:48:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1neBFp-0007Hc-R5 for guix-patches@gnu.org; Tue, 12 Apr 2022 03:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54723] [PATCH] Check URI when verifying narinfo validity. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Apr 2022 07:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54723 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Guillaume Le Vaillant Cc: 54723@debbugs.gnu.org Received: via spool by 54723-submit@debbugs.gnu.org id=B54723.164974964327793 (code B ref 54723); Tue, 12 Apr 2022 07:48:01 +0000 Received: (at 54723) by debbugs.gnu.org; 12 Apr 2022 07:47:23 +0000 Received: from localhost ([127.0.0.1]:47323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neBFC-0007ED-KM for submit@debbugs.gnu.org; Tue, 12 Apr 2022 03:47:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neBFA-0007E0-VS for 54723@debbugs.gnu.org; Tue, 12 Apr 2022 03:47:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neBF5-0003lq-EJ; Tue, 12 Apr 2022 03:47:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=npWX9zU57ICWs4BXE03YTavMJCR/NHnaWGnbMPJeCEU=; b=cBTpUhXW9Tx3zsWpierU pi0/ab3TNkbp/5p4TbNahXhHgxdV0aBqYwJyMmzewaB7W5BsHw5a5+xqw5up23pXvbPjSFhyaCxiU 9hes1B/VVsrGfQ0YZtTBobVu1GR5R8mA2opEBXkXpjofgnO47ZkuP6lsKkQcijE4V5XG4qpN1mBLw h1p7rMnLd+iVD1oNgZ0TsdPweghGnBhNKKTvgcKRpySr6CN84LG0ZnDwQCINrfo3rbCjXCsZZzKDe /oKJEMTnWedxiqfsuSvfdOmiWNVzIDz+oj1TtT5nrHjWTKUSMQDAkb8cdAxVOknKq3294T5kOeZtc G8sDqzVOHOC+2A==; Received: from [193.50.110.136] (port=57358 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neBF4-0005Fb-St; Tue, 12 Apr 2022 03:47:15 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87a6czbzvh.fsf@kitej> <877d83lapv.fsf@gnu.org> <875ynnbe65.fsf@kitej> <87pmlq6lqx.fsf_-_@gnu.org> <877d7ydjwk.fsf@kitej> <87wnfv90cl.fsf@kitej> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 Germinal an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 12 Apr 2022 09:47:12 +0200 In-Reply-To: <87wnfv90cl.fsf@kitej> (Guillaume Le Vaillant's message of "Mon, 11 Apr 2022 13:31:31 +0000") Message-ID: <871qy2g2v3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1649749802; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=npWX9zU57ICWs4BXE03YTavMJCR/NHnaWGnbMPJeCEU=; b=r6BbG0YX1su4u1Xorfiqcjow2PszIU6xR82T5TGnYQ1Sv21ONcwruGQf3pYo2SCSDl4NNR SIqYG4zH61Z4VVP//LINiPDbiMrrJFczveJIyGWuIonCYfVhjUNcVR1/Wqg7JQHYtDWWph PKasu/VcN27bFi5tja6wxo57uRxRzLDwhUCR+wTk9MpoF+B0wh244qX9QdVc0eEO59IylM a/UJMpJysKY6jrbJBrwxMDW9lB6C9nEgoTTluSjE3nQGLPo/h9ooP/C20Qsg0Dwwoppc6z Xcom04HrFlge53IWuV6M/Vmfk8RJe1gq66hsbk65W2hkrzFEGzfSJqW+jXfXYA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649749802; a=rsa-sha256; cv=none; b=Q9JE18qRBZG3RXt/LQfnunzX+thYe+kzlALGDgBmNJD9s84xnuY0pCJiyQOCgErDlz+vVk 1l2YFC/VFR8Uq9ZwKhy5QFT6y48b0ATg5MboCTDcErksv3VL7heRHMJazbMmN2Slvp+2oC LdT+fFZfgeQ0PSVHG8RPYKwGouzDorRrT1XiZv5EfXjtkV7avqqg5SCZq1OKUP/sSABI9N ++H6elOwa5oyWoOss1lfcNOxeDnfU4MRhWSTctGzMzdYAfdngtgeCSO0cO+8n04IjvUlP2 xsitNKwAVNfJiz72epX4rOKbwzkpWzsTy3Bwnyzb8bsHCB13HFgX+V2SZpha2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=cBTpUhXW; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.46 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=cBTpUhXW; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 43A8B3A854 X-Spam-Score: -2.46 X-Migadu-Scanner: scn1.migadu.com X-TUID: p709fKGm2kHG Hi, Guillaume Le Vaillant skribis: > However, looking at the full TCP stream in wireshark I saw that the > "guix publish" server sends some bad narinfo responses. > Sometimes some parts of the response are missing (here, Signature > incomplete, URL and Compression fields missing): > > HTTP/1.1 200 OK > Content-Length: 959 > Content-Type: application/x-nix-narinfo;charset=3DUTF-8 > > StorePath: /gnu/store/dxpaqmix7zixm8pwcvvmq8q969q50jpp-pngload-2.0.0-2.91= f1d70-checkout > NarHash: sha256:0s94fdbrbqj12qvgyn2g4lfwvz7qhhzbclrpz5ni7adwxgrmvxl1 > NarSize: 245224 > References:=20 > Deriver: ybdimrfjs090kzmimf5j1x5hs8y4d24p-pngload-2.0.0-2.91f1d70-checkou= t.drv > Signature: 1;kitej;KHNpZ25hdHVyZSAKIChkYXRhIAogIChmbGFncyByZmM2OTc5KQogIC= hoYXNoIHNoYTI1NiAjNDY3NDk2RTJEOTZBMzc0QzFGN0M1MzJCNjc3MTM1NzVFOTkyRjQ0Qzc3M= zQwRDUwQTcyRTkyMDJGRURDQkQxMyMpCiAgKQogKHNpZy12YWwgCiAgKGVjZHNhIAogICAociAj= MDZEQTAwMkQyNjE3MEQ3ODVDNkM3NkMyMUEwM0UzNDlCMkUwMDc4MTUyQzFBQURFNjhFMEZGOUJ= DRkUyMUFDNSMpCiAgIChzICMwNjNDM0UyNjg2MEU2OTIzNDdEMjNGNTQ4RUM3RDJGRUZGQjc0Q0= I4NjNEMjlDMUE3QjA4REFCQjEzQjZDRjAxIykKICAgKQogICkKIChwdWJsaWMta2V5IAogIC > > > Sometimes the response looks like almost complete garbage: > > HTTP/1.1 200 OK > Content-Length: 970 > Content-Type: application/x-nix-narinfo;charsetcharsetHTTP/=3DUTF-8 > > 1 > 1 > > 1 > .S > > When the client receives these bad narinfos, it often makes it crash > with errors like: > - Wrong type (expecting exact integer): #f > - unmatched line "1\r" > - Wrong type argument in position 1 (expecting pair): () Woow. How do you build and run =E2=80=98guix publish=E2=80=99? Is it a di= stro package or is it coming straight from Guix? What command-line options are you passing? I=E2=80=99ve never seen this, although we have it running on several server= s, notably ci.guix. I wonder what could cause this. Thanks, Ludo=E2=80=99.