From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66390: `man' allows to inject arbitrary shell code Date: Sat, 07 Oct 2023 21:26:40 +0300 Message-ID: <83h6n2z3tr.fsf@gnu.org> References: <83wmvyzir2.fsf@gnu.org> <585dcaf0-358e-4a9d-84d1-6fd9c2c8aec5@gmail.com> <83v8bizf9r.fsf@gnu.org> <1865abb8-16cd-4570-9a8a-87cf9430583d@gmail.com> <875y3iigua.fsf@gmx.de> <83o7hazap7.fsf@gnu.org> <87mswugyoq.fsf@gmx.de> <83jzryz6op.fsf@gnu.org> <87a5sugwcx.fsf@gmx.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17077"; mail-complaints-to="usenet@ciao.gmane.io" Cc: manikulin@gmail.com, 66390@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 07 20:26:55 2023 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 1qpC0s-0004Bu-7m for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Oct 2023 20:26:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpC0i-0006Jz-TS; Sat, 07 Oct 2023 14:26:44 -0400 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 1qpC0g-0006Jp-B2 for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 14:26:42 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpC0g-00012F-3Q for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 14:26:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpC0z-0001ZP-Jl for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 14:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Oct 2023 18:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66390 X-GNU-PR-Package: emacs Original-Received: via spool by 66390-submit@debbugs.gnu.org id=B66390.16967032146018 (code B ref 66390); Sat, 07 Oct 2023 18:27:01 +0000 Original-Received: (at 66390) by debbugs.gnu.org; 7 Oct 2023 18:26:54 +0000 Original-Received: from localhost ([127.0.0.1]:55889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpC0s-0001Z0-Ek for submit@debbugs.gnu.org; Sat, 07 Oct 2023 14:26:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpC0q-0001Ym-OT for 66390@debbugs.gnu.org; Sat, 07 Oct 2023 14:26:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpC0R-000119-3U; Sat, 07 Oct 2023 14:26:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HxUROOchoDnaMe84tG6yRqOqKVQRhu2sjndfMYBY8NY=; b=VkViglzx4u5B Cr0clyR4yt8hDYIbjq1C6yL5SxIM5jwYmQQ1tHWdA1q/yXNpeTEV3CaOCE4IKmlicAbhMWyM4Ndp2 PLdk5eu6z6lvwQmQ2A0mlQf/TiNDIZXKlQtAPMBxp1IrQny94i6078qTYA10BzLHqFOCMseU3JUMu g6e7imWk+eHwIzb/mWIouovvb4Y14F25HFm2dUZihgW6/A1sgb3jhrCZAHCnMbmxUKub8KQXIoXZM znx50J87IbB4XEgkHOYeMFwACLi3VQnabq8i4X3Lfo+0Umt0sZHl8eY8/bFmd8x5yulLfZIjkNbVe Cqzvq87aCKefo5xaHiq43g==; In-Reply-To: <87a5sugwcx.fsf@gmx.de> (message from Michael Albinus on Sat, 07 Oct 2023 19:45:18 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272034 Archived-At: > From: Michael Albinus > Cc: manikulin@gmail.com, 66390@debbugs.gnu.org > Date: Sat, 07 Oct 2023 19:45:18 +0200 > > Eli Zaretskii writes: > > >> > And what kind of shell would we assume when rejecting that? > >> > >> It isn't a problem of the shell. Man-translate-references manipulates > >> the arguments such a way that no shell quoting is neded. > > > > Then there's no problem to begin with, since the OP claims the problem > > is with the shell? > > The OP claims that the arguments could be misused, bypassing exotic > strings which would do terrific work in the shell man is using. So the problem _is_ with the shell? If so, the best way of avoiding these problems is not invoke 'man' via the shell, but via call-process and its ilk instead. > > There's only madness down that road. > > Well, if you still believe there's nothing to do for us I will be quiet. We can do something, just not the way it was suggested: avoid using the shell.