From: Michael Albinus <michael.albinus@gmx.de>
To: Max Nikulin <manikulin@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 66390@debbugs.gnu.org
Subject: bug#66390: `man' allows to inject arbitrary shell code
Date: Sat, 07 Oct 2023 17:37:33 +0200 [thread overview]
Message-ID: <875y3iigua.fsf@gmx.de> (raw)
In-Reply-To: <1865abb8-16cd-4570-9a8a-87cf9430583d@gmail.com> (Max Nikulin's message of "Sat, 7 Oct 2023 21:29:12 +0700")
Max Nikulin <manikulin@gmail.com> writes:
Hi,
>> Sorry, I disagree. 'man' is an interactive command, so it should
>> not
>> second-guess the user who invokes it. Commands that call 'man'
>> non-interactively should make sure they call 'man' with a valid
>> argument, especially when the argument comes from some file.
>
> Does man.el provide a function that opens references to man pages, but
> that is safe in respect to shell specials?
>
> Calling of shell commands belongs to implementation details of man.el
> and effectively you require that callers must be aware of it.
I tend to agree with both :-) The caller of a shell command (`man ARGS') is
responsible for proper quoting of the arguments.
The function `Man-translate-references' tries to do it. For example, it
translates the argument "cat(1)" into "1 cat", which doesn't pose a
problem. The function should check stronger, and it should reject
arguments like "File:\\:UserDirs(3pm)". ol-man.el should be busy to
offer only valid arguments to `man' according to the man page man(1).
Oh man ...
Best regards, Michael.
next prev parent reply other threads:[~2023-10-07 15:37 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 12:47 bug#66390: `man' allows to inject arbitrary shell code Maxim Nikulin
2023-10-07 13:04 ` Eli Zaretskii
2023-10-07 14:12 ` Max Nikulin
2023-10-07 14:19 ` Eli Zaretskii
2023-10-07 14:29 ` Max Nikulin
2023-10-07 15:10 ` Eli Zaretskii
2023-10-07 15:37 ` Michael Albinus [this message]
2023-10-07 15:58 ` Eli Zaretskii
2023-10-07 16:55 ` Michael Albinus
2023-10-07 17:24 ` Eli Zaretskii
2023-10-07 17:45 ` Michael Albinus
2023-10-07 18:26 ` Eli Zaretskii
2023-10-08 3:37 ` Max Nikulin
2023-10-08 5:28 ` Eli Zaretskii
2023-10-09 15:12 ` Max Nikulin
2023-10-09 15:52 ` Eli Zaretskii
2023-10-09 16:30 ` lux
2023-10-09 16:48 ` Eli Zaretskii
2023-10-09 17:07 ` Ihor Radchenko
2023-10-09 17:20 ` Andreas Schwab
2023-10-10 2:47 ` lux
2023-10-10 7:43 ` Stefan Kangas
2023-10-10 12:11 ` Eli Zaretskii
2023-10-10 12:25 ` Stefan Kangas
2023-10-10 11:09 ` Max Nikulin
2023-10-10 10:54 ` Max Nikulin
2023-10-10 14:30 ` lux
2023-10-10 16:21 ` Andreas Schwab
2023-10-11 3:08 ` lux
2023-10-11 10:46 ` Max Nikulin
2023-10-20 21:00 ` Stefan Kangas
2023-10-21 7:19 ` Eli Zaretskii
2023-10-21 7:35 ` Andreas Schwab
2023-10-21 7:45 ` Eli Zaretskii
2023-10-21 9:19 ` Stefan Kangas
2024-01-10 21:21 ` Stefan Kangas
2024-01-11 12:07 ` Ihor Radchenko
2024-01-11 14:34 ` Max Nikulin
2024-01-11 15:07 ` Ihor Radchenko
2024-01-11 15:28 ` Eli Zaretskii
2024-01-11 15:37 ` Ihor Radchenko
2023-10-09 2:36 ` Richard Stallman
2023-10-09 11:04 ` Eli Zaretskii
2023-10-10 11:56 ` Richard Stallman
2023-10-11 10:56 ` Max Nikulin
2023-10-08 3:42 ` Maxim Nikulin
2023-10-08 5:20 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875y3iigua.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=66390@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=manikulin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).