oss-sec mailing list archives

Re: Fw: Security risk of vim swap files


From: Adam Shannon <adamkshannon () gmail com>
Date: Tue, 31 Oct 2017 10:41:48 -0400

metasploit has had such a check available for a while now.

https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/http/backup_file.rb

On Tue, Oct 31, 2017 at 9:50 AM, Solar Designer <solar () openwall com> wrote:

On Tue, Oct 31, 2017 at 02:35:59PM +0100, Jakub Wilk wrote:
There's another problem with vim swapfiles.

If you edit a file directly in /tmp, vim will happily read a swapfile
that were planted there by somebody else. Local users could exploit this
for denial of service (or maybe worse if there are any swapfile parsing
bugs...).

Is that a bug in vim? Or is it a user error to edit file directly in
/tmp?

Almost all manual uses of /tmp are user errors, yet we could want to
harden programs to make such misuses less risky.

In the latter case, we should fix at least vipe(1) and vidir(1) from
moreutils; and run-mailcap(1).

Alexander


Current thread: