Subject: Re: bug#44128: [feature/native-comp]

From: Phil Sainty <[email-masked]>
Date: Fri, 16 Apr 2021 01:01:08 +1200

I'll add that the following two results suggest that the code
which (this version of) Emacs tries to load or run might vary
depending on the files which happen to be in the CWD at the time.

I think at best this may result in failures or inconsistencies
as I've encountered, and at worst it's probably exploitable.

Surely the start-up process shouldn't be looking in the CWD
for anything?

> it apparently gets confused by the 'emacs' directory in my HOME
> 
> $ ls -lad emacs
> drwxrwxr-x 25 phil phil 4096 Mar 28 23:30 emacs
> 
> $ emacs --version
> emacs: /home/phil/../native-lisp/28.0.50-abd7aa58/preloaded/window-0d1b8b93-581f9fcd.eln: cannot open shared object file: No such file or directory
> 
> $ cd /home/phil/emacs/native-comp/usr/local/bin/
> 
> $ emacs --version
> GNU Emacs 28.0.50
> Copyright (C) 2021 Free Software Foundation, Inc.
> GNU Emacs comes with ABSOLUTELY NO WARRANTY.
> You may redistribute copies of GNU Emacs
> under the terms of the GNU General Public License.
> For more information about these matters, see the file named COPYING.