Bug 1508786 (CVE-2017-1000382)

Summary: CVE-2017-1000382 vim: Ignores umask when creating a swap file
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: cbuissar, gchamoul, karsten, zdohnal
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
It was found that vim applies the opened file read permissions to the swap file, overriding the process' umask. An attacker might search for vim swap files that were not deleted properly, in order to retrieve sensitive data.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 10:36:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1508787    
Bug Blocks: 1508790    

Description Andrej Nemec 2017-11-02 08:54:02 UTC
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://seclists.org/oss-sec/2017/q4/145

Comment 1 Andrej Nemec 2017-11-02 08:54:29 UTC
Created vim tracking bugs for this issue:

Affects: fedora-all [bug 1508787]

Comment 3 Cedric Buissart 2017-12-20 10:36:22 UTC
Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.