bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33366: emacsclient to not follow symlinks to sockets


From: Paul Eggert
Subject: bug#33366: emacsclient to not follow symlinks to sockets
Date: Mon, 3 Dec 2018 00:09:15 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

After looking into this, I don't see any good solution on older systems where Emacs sockets are put under /tmp, particularly on ancient systems where /tmp is not sticky. There are too many ways to fool Emacs with symlinks, and none of the workarounds avoid all races. I did install the attached patch to fix a race that is reasonably easy to fix, by checking the socket's UID after connecting to it as well as before connecting to it.

On more-modern desktops where Emacs sockets live under XDG_RUNTIME_DIR (see Bug#33367, now fixed), the security issues of symlinks-to-sockets should go away unless the user explicitly specifies a socket. This may be the best we can do.

Attachment: 0001-emacsclient-fix-symlink-socket-race.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]