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: Fri, 16 Oct 2020 11:45:14 +0200 Message-ID: References: <5A2CDAEA-03CF-4F92-AF9D-40421A9B362E@acm.org> <83zh4nwgbs.fsf@gnu.org> <024E3091-EB4E-419F-847B-CDB2FF3C96CC@acm.org> <83r1pzwb2q.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="9684"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 44018@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 16 11:46:13 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 1kTMJQ-0002OM-6S for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Oct 2020 11:46:12 +0200 Original-Received: from localhost ([::1]:34232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTMJP-000159-4E for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Oct 2020 05:46:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTMJG-00013Y-LX for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2020 05:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kTMJG-0007ry-CJ for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2020 05:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kTMJG-0005S3-8Z for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2020 05:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Oct 2020 09:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44018 X-GNU-PR-Package: emacs Original-Received: via spool by 44018-submit@debbugs.gnu.org id=B44018.160284152720905 (code B ref 44018); Fri, 16 Oct 2020 09:46:02 +0000 Original-Received: (at 44018) by debbugs.gnu.org; 16 Oct 2020 09:45:27 +0000 Original-Received: from localhost ([127.0.0.1]:57697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTMIh-0005R6-6Q for submit@debbugs.gnu.org; Fri, 16 Oct 2020 05:45:27 -0400 Original-Received: from mail1433c50.megamailservers.eu ([91.136.14.33]:33748 helo=mail263c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTMIe-0005Qn-H5 for 44018@debbugs.gnu.org; Fri, 16 Oct 2020 05:45:26 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1602841517; bh=5GB8kdEA9SXkmzS4BgngMD5/rSMIKnZUbExeFEPfrHg=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=gc/v+lsXYtQbcjctd6rDFqBWA0oaltrk+TomyM3ZVYhOUaYmlJ0BDi5e2zZXSBine BQFNRcVdyevSvCDPSpCByLSP48PS5mfig33adNKHzY98kRCl0qnAaB4nb8Ew4+GJtN bnWsSr91RHXQEl/v7S4mFX7OeDE3Hxf9fbezblwg= 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 mail263c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 09G9jFmg018661; Fri, 16 Oct 2020 09:45:17 +0000 In-Reply-To: <83r1pzwb2q.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A782F29.5F896BAD.00AB, 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=e6d4tph/ c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=QSW7H6V1MBmUL0kLStEA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 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:190677 Archived-At: 15 okt. 2020 kl. 21.20 skrev Eli Zaretskii : > Any specifics, though? Surely, if the risks are known, there should > be some vulnerabilities recorded somewhere? Is it possible to give a > couple of examples, or refer to known vulnerabilities? Sorry for being unclear. This is not about known vulnerabilities (which = we hope are not present!) but about reducing risks -- ie, exposure to = unknown present and future security holes. Security thinking takes some getting used to; risks have to be motivated = by clear needs. In this case, the needs for calls to play-sound-file = with arbitrary input data seem very small but the risks aren't = commensurate. > I'm not sure I understand: what's unsafe in playing sound? A fair question! Safe parsing and handling of binary file formats can be = surprisingly difficult, especially in an unsafe language; the slightest = mistake can be exploited by an intelligent adversary. It could be a = buffer overrun, an unsufficiently checked parameter, signedness = confusion, nonsensical combination of values, unexpected alignment, = legal but untested values, text encoding traps in string fields (oh = yes)... I have written many sound and image file parsers over the years, = most of which would be completely unsuitable in a hostile environment. And new attack vectors keep turning up. Inaudible sound streams carrying = covert instructions to always-on voice-activated assistants? Maybe all = they can do is to turn off the lights or order you more rolls of toilet = paper but don't count on it. Most weaknesses are likely to have been fuzzed and patched out of = existence by now but it does not change the fact that playing arbitrary = audio is an activity that will always carry more inherent risk than, = say, calling ding or split-string, also in the same list of safe = functions. But, someone objects, I play arbitrary sound files in my web browser all = the time! Yes, and that is not free of risk either -- but that web = browser is likely to have undergone more care and hardening of these = code paths than Emacs: more careful selection of libraries and APIs = used, fewer obscure or obscure file formats supported, and even measures = taken to contain breaches, such as sandboxing. Finally, Emacs must be completely trusted as a tool for inspecting = arbitrary files, even ones prepared with malicious intent. > Do you understand why 'message' was removed? I can only guess, but that function could be used to display deceptive = messages that mislead the user to take actions against his or her own = interest. Removing it looks like a wise decision.