oss-sec mailing list archives
Re: Re: Fw: Security risk of vim swap files
From: Jakub Wilk <jwilk () jwilk net>
Date: Fri, 3 Nov 2017 17:39:36 +0100
* Christian Brabandt <cb () 256bit org>, 2017-11-02, 22:29:
Vim copies the permission from the file being edited. Although the swap file is readable by others this does not leak any information here, since the file being edited is already readable by others.
In general, what vim does (copying mode bits) in not enough to ensure that the swapfile is readable only by the users who had access to the original file. It would have to copy also group ownership and ACLs.
Also, keep in mind how this thread started. Somebody edited wp-config.php, which was readable by the web server, of course; then vim created .wp-config.php.swp with the same-ish permissions, which made the file readable to the whole (external) world. Oops.
-- Jakub Wilk
Current thread:
- Re: Fw: Security risk of vim swap files, (continued)
- Re: Fw: Security risk of vim swap files Jakub Wilk (Nov 01)
- Re: Fw: Security risk of vim swap files Leonid Isaev (Nov 01)
- Re: Fw: Security risk of vim swap files Kurt Seifried (Oct 31)
- Re: Fw: Security risk of vim swap files Jan Pokorný (Nov 01)
- Re: Fw: Security risk of vim swap files Matthias Weckbecker (Nov 21)
- Re: Fw: Security risk of vim swap files Z5T1 (Nov 01)
- Re: Re: Fw: Security risk of vim swap files Michael Orlitzky (Nov 01)
- Re: Re: Fw: Security risk of vim swap files Florent Rougon (Nov 01)
- Re: Re: Fw: Security risk of vim swap files Michael Orlitzky (Nov 01)
- Re: Fw: Security risk of vim swap files Christian Brabandt (Nov 02)
- Re: Re: Fw: Security risk of vim swap files Kurt Seifried (Nov 02)
- Re: Re: Fw: Security risk of vim swap files Jakub Wilk (Nov 03)
- Re: Re: Fw: Security risk of vim swap files Scott Court (Nov 03)
- Re: Re: Fw: Security risk of vim swap files Nick Bowler (Nov 03)
- Re: Fw: Security risk of vim swap files Christian Brabandt (Nov 03)
- Re: Fw: Security risk of vim swap files Christian Brabandt (Nov 03)
- Re: Fw: Security risk of vim swap files Christian Brabandt (Nov 05)
- Re: Fw: Security risk of vim swap files Solar Designer (Nov 05)
- Re: Fw: Security risk of vim swap files Scott Court (Nov 05)
- Re: Fw: Security risk of vim swap files Kurt Seifried (Nov 05)
- Re: Fw: Security risk of vim swap files Seth Arnold (Nov 06)
- Re: Fw: Security risk of vim swap files Jakub Wilk (Nov 07)