From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#44018: Don't consider play-sound-file to be a 'safe' function Date: Sat, 31 Oct 2020 14:33:02 +0100 Message-ID: <791D1B8F-632B-4E90-9B3A-27B10BACFC9B@acm.org> References: <5A2CDAEA-03CF-4F92-AF9D-40421A9B362E@acm.org> <83zh4nwgbs.fsf@gnu.org> <87mu0mrapy.fsf@gnus.org> <83k0vqwuxf.fsf@gnu.org> <87eelkgbnv.fsf@tcd.ie> <83zh48ewmd.fsf@gnu.org> <156CF4D0-EA6C-454C-9C7D-98A2DD3BFB70@acm.org> <83y2jset9g.fsf@gnu.org> <83k0v695ul.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8828"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Basil L. Contovounesios" , Lars Ingebrigtsen , 44018-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 31 14:34:18 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYr1N-00029d-Jl for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 31 Oct 2020 14:34:17 +0100 Original-Received: from localhost ([::1]:58820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYr1M-0000qL-M4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 31 Oct 2020 09:34:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYr18-0000km-QQ for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2020 09:34:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49166) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYr18-00047h-Gz for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2020 09:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYr18-0005Fe-EC for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2020 09:34:02 -0400 Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2020 13:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 44018 X-GNU-PR-Package: emacs Mail-Followup-To: 44018@debbugs.gnu.org, mattiase@acm.org, mattiase@acm.org Original-Received: via spool by 44018-done@debbugs.gnu.org id=D44018.160415119520126 (code D ref 44018); Sat, 31 Oct 2020 13:34:02 +0000 Original-Received: (at 44018-done) by debbugs.gnu.org; 31 Oct 2020 13:33:15 +0000 Original-Received: from localhost ([127.0.0.1]:60710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYr0M-0005EX-OS for submit@debbugs.gnu.org; Sat, 31 Oct 2020 09:33:15 -0400 Original-Received: from mail1442c50.megamailservers.eu ([91.136.14.42]:36512 helo=mail264c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYr0K-0005EH-Kh for 44018-done@debbugs.gnu.org; Sat, 31 Oct 2020 09:33:13 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1604151186; bh=m4kEHh9cFbTXnuCg2tpDpi9GuDhgAUNpp1jhn9tJAsE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=HujXO9R4WZ1roVJzTAxXKma2eNr7sMy9p0+U6Xc4MzEWW0zxhOwIoojHlVij59zVL zJcwoxqBE93ajKyiK3jvarWmRKXIuSEE8yKCP9kK+fn6YhW41EFFZu7d2SBEriIHLe 16EPANK/HgbtgGO51H5rXI0P0r925QBgx5OOIyac= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail264c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 09VDX3Lb025580; Sat, 31 Oct 2020 13:33:05 +0000 In-Reply-To: <83k0v695ul.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A782F25.5F9D6792.0009, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=PPNxBsiC c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=9QLmyvbgZgaeIH1Z0EgA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192268 Archived-At: 31 okt. 2020 kl. 09.06 skrev Eli Zaretskii : > I'm okay with doing this, but please add commentary that explains > these removals and the general policy for considering a function > "safe". Agreed -- done and pushed. I also removed 'throw' since it can be used to alter the flow control of = a program if evaluated inside a 'catch' form as well as inject an = arbitrary value that way, and 'catch' since it makes little sense = without 'throw'. More importantly, 'replace-regexp-in-string' was removed because it = could be used to execute arbitrary code. I've removed the side-effect-free property of 'assoc' for the same = reason. These mistakes, and the fact that unsafep allows some limited use of = setq, apply, let, push, pop etc, makes me doubt the safety of unsafep = entirely and would recommend against using it in new code. The attack = surface is simply too large and difficult to overview. For example, the = long list of 'side-effect-free' functions hasn't really been vetted with = security in mind (assoc is a case in point).