From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: emacs-29 3c1693d08b0: Fix Elisp code injection vulnerability in emacsclient-mail.desktop Date: Thu, 09 Mar 2023 10:30:14 +0100 Message-ID: <87sfeenuft.fsf@gmail.com> References: <167821009581.14664.5608674978571454819@vcs2.savannah.gnu.org> <20230307172816.2D56BC13915@vcs2.savannah.gnu.org> <877cvsozn5.fsf@yahoo.com> <87zg8onfob.fsf@yahoo.com> <87r0tzoeam.fsf@yahoo.com> <87a60no7su.fsf@yahoo.com> <87edpzplom.fsf@gmail.com> <87a60npirc.fsf@gmail.com> <83mt4n49az.fsf@gnu.org> <87wn3rnos1.fsf@gmail.com> <560b874e-f67e-0b45-d489-8a45c4d8312d@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27958"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , ulm@gentoo.org, luangruo@yahoo.com, emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 09 10:31:03 2023 Return-path: Envelope-to: ged-emacs-devel@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 1paCc1-00075I-Bn for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Mar 2023 10:31:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paCbQ-0007MJ-Sj; Thu, 09 Mar 2023 04:30:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paCbL-0007Hh-Ry for emacs-devel@gnu.org; Thu, 09 Mar 2023 04:30:23 -0500 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paCbK-0005Hp-BI; Thu, 09 Mar 2023 04:30:19 -0500 Original-Received: by mail-wr1-x430.google.com with SMTP id j2so1168775wrh.9; Thu, 09 Mar 2023 01:30:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678354216; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from:from :to:cc:subject:date:message-id:reply-to; bh=JuGV0ZZta6A5s2u63rsScRFcQcTzYCuIei53Jg4t3tM=; b=Kx4eu/fnYVzxw8DOMjBa+W/4kXDPct8HCHJ43uxJHlR3rFVwIuI8RsJFYsWfVIwfPe sjH8HJcw09wqhnxvoEh/sU/7wElo/x5cBfDipGWOmuEoNHmB0ndNy8Tkqy1voSgdbi0J EJRDfR4HfWAOkxYQkb8sCIl5+vJgzKGqNJ+9o+vt4UmyI9rCzHLBz70yTobh+YNRgj1Q jJcAtxZ2GqhTc2dsox/mtetRYZhSQ1viZgzaHJ1lK1lj5b94cRCIsP8nbpnjFbx0uuu/ 7Uof7/jfDG5w9IrSRQqwKTuuB7kAy5NJCePgnBV0k+yIPq6ap6sUPvdBp85MbExDngn3 s4vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678354216; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JuGV0ZZta6A5s2u63rsScRFcQcTzYCuIei53Jg4t3tM=; b=wNfBigSmeoF4jus55DJbwrWGEld5wBCiskSOAG7lCCirbROASfxB79GVYHCAasNQwh cvLuugMX/7bXxaqgGfBYyWMuX9RvUJ3+4/FAOEzIZFiG8D7xkCW6uHdLMyHXuflLPoes JW3q7BPNwh/seP51Ljy2uPgd3tLoBDSNF7+1ZkP/Y0c9HZDfD0x88ufUJnpbWn1K68xt UjaLPwhoGQFVc2lwgdyjSJd/W3Z5RQG3LydrnbyDkfjaWobjke3glqO4v5Hk4EA0rJpK Et8qkIxuCChvFBN/fJST7b5qL6gu9TP60TY2BwW4KuGUmGnuAw4NE4f9nUEGd3uiQqvE Vdkg== X-Gm-Message-State: AO0yUKUvHwHrs0RENW5bJex+mSkN2F73sIy/S9LOkyVvWERXquKgC5Qg fEyLkp78OzIvJhX6PRavw5pMYRU/WAA= X-Google-Smtp-Source: AK7set/f7mUVnOMM4oX6MlXCIVNJBGnTr+Dvn4Ac6/qZJN3JpHBF3qVtOBDtyti5AWM36X30iqSyog== X-Received: by 2002:adf:fe90:0:b0:2bf:b199:c7eb with SMTP id l16-20020adffe90000000b002bfb199c7ebmr12669978wrr.54.1678354215920; Thu, 09 Mar 2023 01:30:15 -0800 (PST) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id d14-20020a056000114e00b002c57475c375sm17729393wrx.110.2023.03.09.01.30.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 01:30:15 -0800 (PST) In-Reply-To: <560b874e-f67e-0b45-d489-8a45c4d8312d@gmail.com> (Jim Porter's message of "Wed, 8 Mar 2023 10:54:08 -0800") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=rpluim@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304174 Archived-At: >>>>> On Wed, 8 Mar 2023 10:54:08 -0800, Jim Porter = said: Jim> 'set-arg' is probably simple enough that we could expect users to Jim> write it themselves. '--apply' is a bit tricky (for emacsclient at Jim> least), since we'd need to properly escape strings. I guess the Jim> complexity of doing this would depend on how we did the escaping Jim> though. I=CA=BCm not sure what escaping is needed. We take each command line argument and pass it to emacs wrapped in "" so it=CA=BCs treated as a string. Jim> For reference for this thread, the conclusion we came to in bug#57= 752 Jim> was an interface like this: Jim> emacs --apply func1 arg1 arg2 -- --apply func2 arg3 arg4 Jim> (Ditto for emacsclient.) That=CA=BCs not that easy to do with our current usage of getopt. For emacsclient, OTOH, the following is pretty easy to support without any changes to server.el emacsclient --apply func arg1 arg2 since --apply can (ab)use --eval internally. Robert --=20