From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ggztKT65FWbleSkAWB0awg (envelope-from ) for ; Tue, 09 Apr 2024 17:55:10 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=QiVC+uCz; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 94D2D1E0C0; Tue, 9 Apr 2024 17:55:10 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 795F11E030 for ; Tue, 9 Apr 2024 17:55:08 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 16FD03882048 for ; Tue, 9 Apr 2024 21:55:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16FD03882048 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712699708; bh=fUdI4CQbDOtglKeKSXRRgPhPpPdvPfAPEjmwx2QIeHw=; h=Subject:To:Cc:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=QiVC+uCzAUOwbPcmZ15/rrRfryS6AUQ4j81uI2lIIfpyrzzTb6JyBJiQJHDHOXXhI X4Rd94cOx06BKTiidFgq7hIPDZLmZcHHiaL81cGwOV0o0bagUejn7IxA9E2J1dS1pg QvJdFwsv3+n8mh/GSE9cCT1dIkYa5VTmOthNVNHg= Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id 9FFEC3875DDB; Tue, 9 Apr 2024 21:54:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9FFEC3875DDB ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9FFEC3875DDB ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712699662; cv=none; b=i4Kh/iy10SCorFG0KCOe4VD5rxNT4fbfztK3rfkGUa+ddTrAUwRLSEMXUbL7VE3ubs6cWdbVR2Yp2yHl3wpcDXH729tfISEJHZbwRrr1rTHVmG5wNdqiR2s7wj6bXnQiXXBLHhz0mHDcqNqETNwcIXtyr27AmP0oxLpuZuH15lI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712699662; c=relaxed/simple; bh=sYxrz5uDQKd9QZnBu0fRtV340B8eTcbGkBDWalsrh3M=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=jqGHzJK7bDdOtKQVF8KTAV6DmYxz80NX3vndIzHNDQMeSd6a+X/kqurXh7yA7KkZPOvAhOgiWUBorevESnBZm0Wq0u0FFlqIn4di3ZkLhm3k+LPlyH4EOraGqYy+lUxMgTkRAE0J0VpASrRYJtGiz2PGgtc4jvF27XCd7vO0EQ4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3c6007c6410so218903b6e.0; Tue, 09 Apr 2024 14:54:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712699659; x=1713304459; h=mime-version:user-agent:references:in-reply-to:date:cc:to:from :subject:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sYxrz5uDQKd9QZnBu0fRtV340B8eTcbGkBDWalsrh3M=; b=Yu9TWoGiTg2vhPle9cB9B41bl4J2MWJ0awMpeJjeJ+yldm4YK8qK5WTM1m/OpxazJP imWTp6BPpYegQRkjU2znHe/1ne7NxFsVAx8o66d0EA5IxRkM9Xqug4V/SepHNR9C3pfn ZllKNnkEWgFp+9U10Ty6dSe+jBW08VOnEpI5kSFdFx1pPmDbCVCEQ6Qc85/4QFQirzAH G2XIhg/M4k79pyQpzuqfaFra7h/LtdHruSSxHR7ByoJAUZyzrF1i2bBXampPtMOjKaM6 T+9UovQ72cWg9xUdkSPYXrBB0GdlffxASQTzGTVsJIO08rUscweu9EpAhseNPsxfi1n4 PvFw== X-Forwarded-Encrypted: i=1; AJvYcCVaHWP6p/P03W7iUYKR6petIqY7a7ej2K7Jou6kPe0SB6FD/xDEv4YKA9IHgTW7y5kn6Y7dRwV8NMu6y3609l4hpkvkOnPzThXEIwu7N7NEWLYCHyPwBV4tTsZzGD46k6FRWVAFpG0yHvMOqTGLcOl/r/lrFDRdby/K1umFbkGxvbjEMervQLnxfANBUWM0fAg= X-Gm-Message-State: AOJu0YxgfVgXOuDM1NgPgdjieETaznGMQB9lK/Ua5tJKea53cH1oS2/N 6x/eTedq3jbc06370htUcEO7GGaH7WjGEpB6cXnmopPUkvNGzJIl X-Google-Smtp-Source: AGHT+IGBATv3oUduWIMzQX05oMnWhVUnqQXLTw59/HE4P1Toca069UCOnFnm7PTfIT5Haj9IwtFmYA== X-Received: by 2002:a05:6808:1a86:b0:3c5:fe35:4155 with SMTP id bm6-20020a0568081a8600b003c5fe354155mr707097oib.6.1712699658731; Tue, 09 Apr 2024 14:54:18 -0700 (PDT) Received: from [10.41.6.67] ([24.75.238.76]) by smtp.gmail.com with ESMTPSA id a7-20020aca1a07000000b003c5e679337esm1211568oia.47.2024.04.09.14.54.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 14:54:18 -0700 (PDT) Message-ID: <6a1a83fb7f28e876bc9db6777f4bbced0e3e1c49.camel@gmail.com> Subject: Re: Sourceware mitigating and preventing the next xz-backdoor To: Paul Koning Cc: Andreas Schwab , Michael Matz , Martin Uecker , Ian Lance Taylor , Paul Eggert , Sandra Loosemore , Mark Wielaard , overseers@sourceware.org, gcc@gcc.gnu.org, binutils@sourceware.org, gdb@sourceware.org, libc-alpha@sourceware.org Date: Tue, 09 Apr 2024 14:54:16 -0700 In-Reply-To: <62A5C6AE-FE86-48EA-8E0D-E1B17959C8EA@comcast.net> References: <20240329203909.GS9427@gnu.wildebeest.org> <20240401150617.GF19478@gnu.wildebeest.org> <12215cd2-16db-4ee4-bd98-6a4bcf318592@cs.ucla.edu> <6239192ba9ff8aad0752309a54b633dc75a57c77.camel@tugraz.at> <8e877d2f-01e0-c786-dea5-265edbdc0c07@suse.de> <41394737-6f2d-86e7-5742-e0a794f9f63c@suse.de> <4dd125546c920da4cc744a93f230917a7311c7fb.camel@gmail.com> <87h6gazafa.fsf@igel.home> <62A5C6AE-FE86-48EA-8E0D-E1B17959C8EA@comcast.net> User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.30 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jonathon Anderson via Gdb Reply-To: Jonathon Anderson Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Tue, 2024-04-09 at 16:11 -0400, Paul Koning wrote: > > On Apr 9, 2024, at 3:59 PM, Jonathon Anderson via Gcc <[gcc@gcc.gnu.org](= mailto:gcc@gcc.gnu.org)> wrote: > > > CMake has its own sandbox and rules and escapes (granted, much more of > > them). But regardless, the injection code would be committed to the > > repository (point 2) and would not hold up to a source directory mounte= d > > read-only (point 3). >=20 > Why would the injection code necessarily be committed to the repository?= =C2=A0 It wasn't in the xz attack -- one hole in the procedures is that the= kits didn't match the repository and no checks caught this.=C2=A0 I don't = see how a different build system would cure that issue.=C2=A0 Instead, ther= e needs to be some sort of audit that verifies there aren't rogue or modifi= ed elements in the kit. In Autotools, `make dist` produces a tarball that contains many files not p= resent in the source respoitory, it includes build system core files and th= is fact was used for the xz attack. In contrast, for newer build systems th= e "release tarball" is purely a snapshot of the source repository: there is= no `cmake dist`, and `meson dist` is essentially `git archive` ([docs](htt= ps://mesonbuild.com/Creating-releases.html)). Thus for the injection code t= o be present in the release tarball, it needs to have first been checked in= to the repository. In fact, packagers don't *need* to use the tarballs, they can (and should) = use the Git history from the source repository itself. In Debian this is on= e workflow implemented by the popular git-buildpackage ([docs](https://honk= .sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.upstream-git.= html)). The third-party package manager [Spack](https://spack.readthedocs.i= o/en/latest/packaging_guide.html#git) clones directly from the source repos= itory. Others may have support for this as well, this isn't a novel idea. -Jonathon