Bug 1524485 (CVE-2017-17087) - CVE-2017-17087 vim: Sets the group ownership of a .swp file to the editor's primary group
Summary: CVE-2017-17087 vim: Sets the group ownership of a .swp file to the editor's p...
Alias: CVE-2017-17087
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1524489
Blocks: 1508790
TreeView+ depends on / blocked
Reported: 2017-12-11 15:33 UTC by Andrej Nemec
Modified: 2019-09-29 14:28 UTC (History)
3 users (show)

Fixed In Version: vim 8.0.1263
Doc Type: If docs needed, set a value
Doc Text:
It was found that the swap file created by vim when opening a file was using the user's primary group instead of the file's group. An attacker belonging to the victim's primary group could use this flaw to read the vim swap file.
Clone Of:
Last Closed: 2018-01-02 17:36:33 UTC

Attachments (Terms of Use)

Description Andrej Nemec 2017-12-11 15:33:58 UTC
fileio.c in Vim prior to 8.0.1263 sets the group ownership of a .swp file to the editor's primary group (which may be different from the group ownership of the original file), which allows local users to obtain sensitive information by leveraging an applicable group membership, as demonstrated by /etc/shadow owned by root:shadow mode 0640, but /etc/.shadow.swp owned by root:users mode 0640, a different vulnerability than CVE-2017-1000382.



Upstream patch:


Comment 1 Andrej Nemec 2017-12-11 15:35:17 UTC
Created vim tracking bugs for this issue:

Affects: fedora-26 [bug 1524489]

Comment 4 Cedric Buissart 🐶 2018-01-02 17:31:04 UTC
In Red Hat Enterprise Linux, the default primary group is unique to the user (e.g.: root's primary group is root, user1's primary group will be user1, etc.).
Thus unless default primary group is modified at creation time, or at execution time (e.g. via newgrp or sg), this vulnerability will not be effective.

Comment 5 Cedric Buissart 🐶 2018-01-02 17:32:08 UTC

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

Note You need to log in before you can comment on or make changes to this bug.