all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Glenn Morris <rgm@gnu.org>, "Philip K." <philip@warpmail.net>
Cc: 41619@debbugs.gnu.org, philip.kaludercic@fau.de
Subject: bug#41619: [PATCH] Mark python-shell-virtualenv-root as safe local variable
Date: Mon, 15 Jun 2020 21:53:50 +0300	[thread overview]
Message-ID: <83tuzc17pd.fsf@gnu.org> (raw)
In-Reply-To: <65eeqi7uhu.fsf@fencepost.gnu.org> (message from Glenn Morris on Sat, 13 Jun 2020 13:20:29 -0400)

> From: Glenn Morris <rgm@gnu.org>
> Date: Sat, 13 Jun 2020 13:20:29 -0400
> Cc: eliz@gnu.org, philip.kaludercic@fau.de
> 
> 
> I don't understand how python-shell-virtualenv-root can be considered a
> safe local variable. Surely it controls what "python" executable gets run.
> 
> As a test, I did:
> 
> python3 -m venv /tmp/foo
> 
> I then replaced /tmp/foo/bin/python with a shell-script:
> 
>  #!/bin/bash
>  echo oh-oh
> 
> I then ran:
> emacs -Q --eval '(setq python-shell-virtualenv-root "/tmp/foo")' -f python-mode
> C-c C-p
> 
> This gives an inferior Python buffer with contents:
> 
>   oh-oh
> 
>   Process Python finished
> 
> In other words, this looks like a recipe for arbitrary code execution.

Philip, could you please look into this?  TIA.





  reply	other threads:[~2020-06-15 18:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-30 20:31 bug#41619: [PATCH] Mark python-shell-virtualenv-root as safe local variable Philip K.
2020-06-13  7:42 ` Eli Zaretskii
2020-06-13 17:20   ` Glenn Morris
2020-06-15 18:53     ` Eli Zaretskii [this message]
2020-06-16 16:52       ` Philip K.
2020-06-16 17:18         ` Eli Zaretskii
2020-06-16 17:32           ` Philip K.
2020-06-16 17:54             ` Eli Zaretskii
2020-06-16 19:49               ` Philip K.
2020-06-20  8:47                 ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83tuzc17pd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=41619@debbugs.gnu.org \
    --cc=philip.kaludercic@fau.de \
    --cc=philip@warpmail.net \
    --cc=rgm@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.