Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 636186 (CVE-2017-1000382)

Summary: app-editors/vim: umask is ignored when creating a swap file
Product: Gentoo Security Reporter: Aleksandr Wagner (Kivak) <alwag>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Status: RESOLVED WONTFIX    
Severity: minor CC: arthur, vim
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: B4 [noglsa cve]
Package list:
Runtime testing required: ---

Description Aleksandr Wagner (Kivak) 2017-11-01 19:00:55 UTC
CVE-2017-1000382 (https://nvd.nist.gov/vuln/detail/CVE-2017-1000382):

VIM version 8.0.1187 (and other versions most likely) ignores umask when creating a swap file ("[ORIGINAL_FILENAME].swp") resulting in files that may be world readable or otherwise accessible in ways not intended by the user running the vi binary.

References:

http://www.openwall.com/lists/oss-security/2017/10/31/1

@ Maintainer(s): Please confirm which versions are vulnerable in the tree.

Note: It seems no official patches have been released yet.
Comment 1 Aaron Bauman (RETIRED) gentoo-dev 2018-04-08 21:17:16 UTC
This amounts to user hardening and upstream is probably not going to address it as it would break things.  Additionally, web servers should be hardened to combat such issues.
Comment 2 Larry the Git Cow gentoo-dev 2018-04-08 21:37:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80c7123e4565333a0005c01e7f0dd570fbd39d8a

commit 80c7123e4565333a0005c01e7f0dd570fbd39d8a
Author:     Patrice Clement <monsieurp@gentoo.org>
AuthorDate: 2018-04-08 21:36:19 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2018-04-08 21:36:54 +0000

    app-editors/gvim: remove vulnerable versions.
    
    Bug: https://bugs.gentoo.org/636186
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-editors/gvim/Manifest             |   3 -
 app-editors/gvim/gvim-8.0.0386.ebuild | 407 ----------------------------------
 app-editors/gvim/gvim-8.0.1188.ebuild | 371 -------------------------------
 3 files changed, 781 deletions(-)}