unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Eli Zaretskii <eliz@gnu.org>, Paul Eggert <eggert@cs.ucla.edu>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: sudo:: method in tramp possible security issue
Date: Tue, 20 Nov 2018 22:27:01 +0000	[thread overview]
Message-ID: <CALDnm51khRvTJ6CKW-TO7c2No6Sc92oAbOExEh6zj1p0fkbifw@mail.gmail.com> (raw)
In-Reply-To: <878t1n2yll.fsf@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]

On Tue, Nov 20, 2018 at 10:06 PM Michael Albinus <michael.albinus@gmx.de>
wrote:

> Paul Eggert <eggert@cs.ucla.edu> writes:
>
> > On 11/20/18 1:18 PM, Stefan Monnier wrote:
> >> Tramp is not magical: it can do no more nor less than what an attacker
> >> could do.
> >
> > Sure, if the attacker has control over my keyboard, or over my
> > display, or over the Lisp code that I load and execute. That being
> > said, Tramp does make attacks easier, so it has been an easy call for
> > me to disable it.
>
> Tramp's sudo method needs your credentials. If you don't provide them,
> Tramp cannot do anything.
>
> Like calling sudo in a terminal.


It's not exactly like calling sudo in a terminal, because when you
use sudo you generally:

1. perform a one time action and are back at a non-sudo prompt; OR
2. start an interactive superuser session that easy to identify visually
   and for which there isn't a programmatic way for other programs
   to interfere

In other words, what bothers me the most about the sudo:: method is
the persistent sudo session that makes me vulnerable to attackers, and
to my elisp developing mistakes.  This is why I think a warning makes
sense, or some visual way to identify this vulnerable state.

In contrast, using sudoedit:: should not bring about this vulnerable state.

That being said, if your non-elevated user has already been compromised,
entering sudo credentials into Emacs, where elisp can do whatever, is
probably a very bad idea, regardless of Tramp.

João

[-- Attachment #2: Type: text/html, Size: 2189 bytes --]

  reply	other threads:[~2018-11-20 22:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CALDnm52oYOV_kPWZH62ub8seM4uug-GH68ywgXGJfDAbG7_4Xg@mail.gmail.com>
     [not found] ` <87ftvwdcdw.fsf@gmx.de>
     [not found]   ` <CALDnm51fhzD48-40-t04KU9S19Lz8_sf8Y=pKZbnSHR+tbCgTQ@mail.gmail.com>
     [not found]     ` <87bm6kdb68.fsf@gmx.de>
     [not found]       ` <CALDnm53tX4vFz4CH=P27_dUt=9dXWMrE7xdTz3iZuqybsndygg@mail.gmail.com>
     [not found]         ` <jwvmuq4zqsz.fsf-monnier+emacs@gnu.org>
     [not found]           ` <CALDnm52moQthtMvSEw2ELWjZg3yJ8jypG=TBLgSsdr6R8ru0Aw@mail.gmail.com>
     [not found]             ` <87bm6kyxc3.fsf@gmx.de>
     [not found]               ` <CALDnm5211UDT_pW-HzgnRb5dQtnCZSgN+GRGHYM1hPVAjBWavA@mail.gmail.com>
     [not found]                 ` <87k1l83yd3.fsf@gmx.de>
     [not found]                   ` <CALDnm52KU0wNd3Sd-7m78JrPcLsiNuZ8hQxcTs3PgDNG7+0a0g@mail.gmail.com>
     [not found]                     ` <87o9ajvost.fsf@gmx.de>
2018-11-20 14:13                       ` sudo:: method in tramp possible security issue João Távora
2018-11-20 21:14                         ` Paul Eggert
2018-11-20 21:18                           ` Stefan Monnier
2018-11-20 21:25                             ` Paul Eggert
2018-11-20 21:44                               ` Stefan Monnier
2018-11-20 22:06                               ` Michael Albinus
2018-11-20 22:27                                 ` João Távora [this message]
2018-11-20 23:12                                   ` Stefan Monnier
2018-11-21  7:41                                   ` Michael Albinus
2018-11-21 12:26                                     ` Michael Albinus
2018-11-21 12:44                                     ` Filipp Gunbin
2018-11-21 12:51                                       ` Michael Albinus
2018-11-21 14:44                                     ` John Shahid
2018-11-21 14:52                                       ` Michael Albinus
2018-11-21 14:55                                         ` John Shahid
2018-11-21 15:07                                           ` Michael Albinus
2018-11-20 22:16                           ` Michael Albinus
2018-11-20 22:30                         ` Michael Albinus
2018-11-20 22:54                           ` João Távora
2018-11-21  7:49                             ` Michael Albinus
     [not found]           ` <87ftvwyxh7.fsf@gmx.de>
2018-12-16 15:24             ` Tramp sudoedit method (was: sudo:: method in tramp possible security issue) Michael Albinus

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=CALDnm51khRvTJ6CKW-TO7c2No6Sc92oAbOExEh6zj1p0fkbifw@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@iro.umontreal.ca \
    /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).