From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id ED421158041 for ; Sat, 30 Mar 2024 14:57:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 70FC12BC027; Sat, 30 Mar 2024 14:57:33 +0000 (UTC) Received: from james.steelbluetech.co.uk (james.steelbluetech.co.uk [78.40.151.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D0FE62BC01A for ; Sat, 30 Mar 2024 14:57:32 +0000 (UTC) Received: from ukinbox.ecrypt.net (hq2.ehuk.net [10.0.10.2]) by james.steelbluetech.co.uk (Postfix) with ESMTP id 065D8BFC18 for ; Sat, 30 Mar 2024 14:57:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.10.3 james.steelbluetech.co.uk 065D8BFC18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ehuk.net; s=default; t=1711810651; bh=U5LBoXvGxNQdWkzH7hBxWrjIgQ5KdcVrUj9H8l6fmH0=; h=In-Reply-To:References:Date:Subject:From:To:Reply-To:From; b=RzPUNHYx8yTJPNYpATBJ6j7FVMWI27FEdDbyzhHKRyqu2jsmoPcaNdkS4bj6GHaKg vS4XeLOSCXPt17oM5NCzMSZBSEDk0VExKEvXv78M9HMNlGBgNCLlqdozBmTDlKd9CY ntnquZ8soz+gEpbWbTjNPMJKwpnu0gMZnQtzjpz/7S0P3SshJsv1LR2l1vqrqRcubU Z1E639PIa57idxgk3arJ8QxMNjpz///zx16hz9tKsG2v91VgPQbjH/dR7jSrFawNnZ XoY8PxgJDgpgZh9TTMiQWNA30wWHreRseXwlHZ0ynyvYuQFF+w7DlcyiLTXXejuI2f 7EogLc8yIAEaw== Message-ID: In-Reply-To: References: <20240329204315.3b29449b@Akita> <1671d927-55d5-6f01-2b54-b33981406945@gmail.com> Date: Sat, 30 Mar 2024 14:57:31 -0000 Subject: Re: [gentoo-dev] Current unavoidable use of xz utils in Gentoo From: "Eddie Chapman" To: gentoo-dev@lists.gentoo.org User-Agent: SquirrelMail/1.5.2 [SVN] Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang X-Archives-Salt: 3fe1c898-3372-4562-b6b6-8a62d30a0f39 X-Archives-Hash: 245d6e374fd17afc4e5d5e64179ee57c Rich, Duncan, Dale, orbea, you have to admit the situation with xz-utils is nothing like the typical scenario people usually worry about, where a bad actor manages to compromise a project and slip something into a widely used piece of software. No, this is the the bad actor *themselves* being a principal author of the software, working stealthily and in very sophisticated ways for years, to manoeuvrer themselves and their software into a position of trust in the ecosystem whereby they were almost able to pull off the mother of all security nightmares for the world. And many very smart people reviewed what they did and were fooled by them (which is no reflection on those people, it was just because the bad actor did a very, very good job of fooling them). I have to ask, if you still trust a codebase to be right at the heart of your system after that, what on earth would it take for you to start to feel uncomfortable??!! Sometimes, it's good when you're inside the house that is on fire, to *not* stand there and say to yourself "well the engineers who built this place must have built it to withstand a fire, I'm sure it will stop burning soon. And anyway, the fire brigade will be here soon, I'm sure it will all be fine". I'm not saying the world of OSS & Linux is on fire, of course not. This is a very isolated and rare situation with just 1 piece of software. No, I'm just using probably a probably bad analogy to make the following point: while almost all of the time a reasoned, "lets just calm down and think about this" approach is right, in some rare situations it is important to see a situation as serious as it and act accordingly. In this case, if I weigh up the benefits of using this piece of software versus another (relatively small gains in file size reduction, some gains in resource usage) against the risks of continuing to use it (and lets be realistic about those risks please rather than "I'm sure it will all be fine"), the risks are far greater. Note, I'm not advocating ripping xz-utils out of tree, all I'm saying is wouldn't it be nice if there were at least 2 alternatives to choose from? That doesn't have to be disruptive in any way, people who wish to continue using and trusting xz-utils should be able to continue to do so without any friction whatsoever. Rich Freeman wrote: > On Sat, Mar 30, 2024 at 3:06 AM Dale wrote: > >> >> when I got to the part about it not likely to affect Gentoo, my level >> of concern dropped significantly. If this is still true, there's no >> need to be concerned. > > "not likely" is the best way to characterize this. The exploit has > not been fully analyzed, and it could have additional malicious behavior, > either designed by its author, or perhaps even unintended by its author. > > I just wanted to toss in that caveat, but agree that the defaults > deployed in Gentoo seem the most sensible for general use. There is > nothing magical about xz - ANY widely-used library could have something > like this embedded in it, and the attacker exploited what they had access > to in order to go after a configuration that was going to be widely > deployed and reachable (xz+deb/rpm+systemd+openssh). If the attacker had > an intended target that used gentoo+openrc and access to something in our > supply chain, this could have been a vulnerability that only impacted > Gentoo. > > > I think the big lesson here is that FOSS continues to suffer from core > dependencies that are challenged for resources, and that efforts to fix > this have to constantly keep up with the changing landscape. xz is going > on 15 years old, but I don't think it was nearly as commonly used until > fairly recently. > > libz has been a pretty well-known source of security flaws for ages > (granted, usually not intentional like this). It isn't too surprising > that in both cases compression libraries were targeted, as these are so > widely depended on. > > This is getting tangential, but part of me wonders if there is a > better way to do authentication. Programs like ssh tend to run as root so > that they can authenticate users and then fork and suid to the appropriate > user. Could some OS-level facility be created to allow unprivileged > processes to run the daemons and then as part of the authentication > process they can have the OS accept a controlled and minimal set of data > to create the process as the new user and hand over the connection? PAM > already has a large amount of control over the authentication process, so > it seems like we just need to change the security context that this runs > in. That's just brainstorming-level thinking though - there could be > obvious issues with this that just haven't occurred to me. > > -- > Rich > > > >