From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-c1p-023465.sys.comcast.net (resqmta-c1p-023465.sys.comcast.net [IPv6:2001:558:fd00:56::5]) by sourceware.org (Postfix) with ESMTPS id 6D6233858D32 for ; Thu, 13 Apr 2023 17:05:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6D6233858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=comcast.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=comcast.net Received: from resomta-c1p-023266.sys.comcast.net ([96.102.18.234]) by resqmta-c1p-023465.sys.comcast.net with ESMTP id mzNqpl1rk0bDpn0NmpBkMw; Thu, 13 Apr 2023 17:05:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1681405514; bh=FtvzjUoH0zYPmBlShHaNr9duJ6zuaJ/BNK3IPPV/Ld4=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To:Xfinity-Spam-Result; b=IZa21NjtXxF1NtH/fshMWzc1t4wTSbEDpmpD0se/2MQI16tefMdms824Vvok0BtH3 oPxeufsjvhP4vBEU6gh+OfGr7j11Cn82/YAkZaGy/T3jlqIi85JlXX4CIGrQv54WPf VugBn0mHZErxGriHbJWMMS0Sg98tWN/gD9vv60hDWh0aEoMeBdFzGExfhgj8MLGR9Y iE2XA5TluzBRvyuGCWZU2WczxGstE2ASV1EHRHnuodZAI0CZxKd+19J/SjldtlNyV/ 2oziooqyJ/Z4yobeQETtwuhpbcXZ7rMjf4MQBckaljz66P1ytcJKjRbahgMXGjezta B0wouHTYxEmlg== Received: from smtpclient.apple ([IPv6:2601:191:200:f52:c8ec:4382:24ec:8e6c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resomta-c1p-023266.sys.comcast.net with ESMTPSA id n0NjpHvITCFAkn0NkpH00h; Thu, 13 Apr 2023 17:05:14 +0000 X-Xfinity-VMeta: sc=-100.00;st=legit Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) Subject: Re: RFC: Adding a SECURITY.md document to the Binutils From: Paul Koning In-Reply-To: <96e2ec59-11c6-329e-18c4-bf284eb752ac@gotplt.org> Date: Thu, 13 Apr 2023 13:05:11 -0400 Cc: Richard Earnshaw , Nick Clifton , Binutils , "gdb@sourceware.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1F7CF3D5-5AC3-4832-BE19-60F956A047F7@comcast.net> References: <1c38b926-e003-0e21-e7f1-3d5dbec2aabf@redhat.com> <5b147005-bd28-4cf9-b9e7-479ef02cb1ad@foss.arm.com> <5d044987-39eb-a060-1b2b-9d07b1515e7d@gotplt.org> <73bc480a-a927-2773-8756-50350f76dfbf@gotplt.org> <4ed86e65-0b7f-11d4-8061-2c5d0b1e147e@foss.arm.com> <7b6b10f8-e480-8efa-fbb8-4fc4bf2cf356@gotplt.org> <0224757b-6b17-f82d-c0bf-c36042489f5e@foss.arm.com> <01e846c0-c6bf-defe-0563-1ed6309b7038@gotplt.org> <2d4c7f13-8a35-3ce5-1f90-ce849a690e66@foss.arm.com> <01b8e177-abfd-549e-768f-1995cab5c81d@gotplt.org> <96e2ec59-11c6-329e-18c4-bf284eb752ac@gotplt.org> To: Siddhesh Poyarekar X-Mailer: Apple Mail (2.3696.120.41.1.3) X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MEDICAL_SUBJECT,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > On Apr 13, 2023, at 1:00 PM, Siddhesh Poyarekar = wrote: >=20 > On 2023-04-13 12:49, Paul Koning wrote: >> If someone sends me an executable file, and I execute it and suffer a = virus, shame on me. If someone sends me a C source file and I compile = and link that BUT DO NOT EXECUTE the resulting executable, and I suffer = a virus, shame on the tool. >=20 > If someone sends me a C source file and I compile and link it without = inspecting it first, then definitely shame on me again. Compilers and = linkers assume *trusted* input. That's news to me. It is true that not all text is valid C, and some text has "undefined" = behavior. But "undefined" is a property of the resulting executable = program, NOT of the act of compiling it. I have never before seen = anyone suggest that submitting a bad program to a compiler could = reasonably be expected to result in that compiler attacking the security = of your system, or that if it did so it wouldn't be a security bug in = that compiler. >> I don't expect the act of compiling or linking or objdumping to = compromise my system's security, any more than I expect the act of = editing a text file to do so. The key point is expectation. I'm = reminded of a legal rule seen, for example, in "expectation of privacy": = I should assume I can be seen when walking around town, but it is valid = for me to assume I'm not seen when at home in my bathroom. Similarly, I = should assume my system can get attacked when I execute a program, but = it is reasonable for me to assume no attack is possible when I run gcc = or objdump (or hexdump or cat). >=20 > It's valid for you to assume that you're not seen when you're at home = in your bathroom. However, if you take a random device someone gives = you with you in your bathroom without actually checking what it does... >=20 > Anyway like I said to Richard, it's all well and good to say that = binutils *should* be able to handle untrusted inputs. The reality is = that it is not in a position to make that claim and the only reasonable = security position the project can take is to strongly recommend either = validating inputs (to make them trusted) or running the tools in a = sandbox. So what you're saying is that, at least in your view, the quality of = binutils is so low that it is unlikely to meet the reasonable = expectation I voiced. And furthermore, that it is in such bad shape = that it's unreasonable to consider fixing it so it does meet those = reasonable expectations. I rather doubt either assumption is true. But if it is, we should say = so (or, arguably, discontinue the project). paul