unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* many packages write to `temporary-file-directory' insecurely
@ 2002-03-01  1:15 Colin Walters
  2002-03-02 11:52 ` Pavel Janík
                   ` (2 more replies)
  0 siblings, 3 replies; 46+ messages in thread
From: Colin Walters @ 2002-03-01  1:15 UTC (permalink / raw)


Hi,

I discovered a security problem with M-x snake, and a number of other
packages. For example, snake writes "snake-scores" to
`temporary-file-directory' (which defaults to /tmp on my system).  If an
attacker creates a symlink /tmp/snake-scores -> /home/luser/.bashrc, and
"luser" later runs M-x snake, then their .bashrc will be happily
overwritten with their snake scores.  Try it.

After a quick grep through the Emacs source, terminal.el looks like it
does something similar in the function `te-create-terminfo'.  And eshell
appears to use `make-temp-name' insecurely in the function
`eshell-parse-variable-ref'., although it is difficult to follow the
code.  And there are a number of others that I haven't investigated too
closely.  Calc was creating a temporary gnuplot file insecurely; I've
just fixed it.  These all *must* be fixed.  

I gather that there have been reports about this problem in the past,
and this was the reason `make-temp-file' was introduced to replace
`make-temp-name'.  If you maintain a package that creates temporary
files, please make sure you are using `make-temp-file'!


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2002-04-05 23:41 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-01  1:15 many packages write to `temporary-file-directory' insecurely Colin Walters
2002-03-02 11:52 ` Pavel Janík
2002-03-02 21:12   ` Colin Walters
2002-03-02 23:13     ` Pavel Janík
2002-03-03 17:18       ` Stefan Monnier
2002-03-03 20:36         ` Al Petrofsky
2002-03-04  0:07           ` Stefan Monnier
2002-03-04 23:41           ` Richard Stallman
2002-03-05  2:26             ` Al Petrofsky
2002-03-05 15:15               ` Stefan Monnier
2002-03-05 19:57                 ` Al Petrofsky
2002-03-05 21:58               ` Richard Stallman
2002-03-04 23:40         ` Richard Stallman
2002-03-05  4:30           ` Colin Walters
2002-03-05 10:20           ` Andreas Schwab
2002-03-05 15:20             ` Stefan Monnier
2002-03-05 19:07               ` Richard Stallman
2002-03-06  4:40               ` Colin Walters
2002-03-06  7:35                 ` Colin Walters
2002-03-06 16:59                   ` Stefan Monnier
2002-03-07  2:40                     ` Colin Walters
2002-03-07  6:00                       ` Eli Zaretskii
2002-03-08  9:08                   ` Richard Stallman
2002-03-08  9:08                   ` Richard Stallman
2002-03-10 10:46                     ` Colin Walters
2002-03-11  9:01                       ` Richard Stallman
2002-03-17 22:08                         ` Colin Walters
2002-03-18 20:06                           ` Richard Stallman
2002-03-18 22:36                             ` Colin Walters
2002-03-18 23:49                               ` Steve Kemp
2002-03-19  0:31                                 ` Colin Walters
2002-03-19  6:22                                 ` Pavel Janík
2002-03-20  5:10                               ` Richard Stallman
2002-03-27 23:46                                 ` Colin Walters
2002-03-31  1:24                                   ` Richard Stallman
2002-04-05  7:30                                     ` Colin Walters
2002-04-05 23:41                                       ` Richard Stallman
2002-03-06 16:59                 ` Stefan Monnier
2002-03-06 19:05                   ` Colin Walters
2002-03-08  9:07                 ` Richard Stallman
2002-03-08 18:52                   ` Colin Walters
2002-03-09 10:49                     ` Richard Stallman
2002-03-03 14:39   ` Richard Stallman
2002-03-04  4:08 ` Richard Stallman
2002-03-04  4:08 ` Richard Stallman
2002-03-04  4:50   ` Colin Walters

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).