Bug 1508787 - CVE-2017-1000382 vim: Ignores umask when creating a swap file [fedora-all]
Summary: CVE-2017-1000382 vim: Ignores umask when creating a swap file [fedora-all]
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: 26
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: CVE-2017-1000382
TreeView+ depends on / blocked
 
Reported: 2017-11-02 08:54 UTC by Andrej Nemec
Modified: 2017-11-30 15:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-30 15:32:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Andrej Nemec 2017-11-02 08:54:18 UTC
This is an automatically created tracking bug!  It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of fedora-all.

For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.

For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs

When submitting as an update, use the fedpkg template provided in the next
comment(s).  This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.

Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.

NOTE: this issue affects multiple supported versions of Fedora. While only
one tracking bug has been filed, please correct all affected versions at
the same time.  If you need to fix the versions independent of each other,
you may clone this bug as appropriate.

Comment 1 Andrej Nemec 2017-11-02 08:54:24 UTC
Use the following template to for the 'fedpkg update' request to submit an
update for this issue as it contains the top-level parent bug(s) as well as
this tracking bug.  This will ensure that all associated bugs get updated
when new packages are pushed to stable.

=====

# bugfix, security, enhancement, newpackage (required)
type=security

# testing, stable
request=testing

# Bug numbers: 1234,9876
bugs=1508786,1508787

# Description of your update
notes=Security fix for [PUT CVEs HERE]

# Enable request automation based on the stable/unstable karma thresholds
autokarma=True
stable_karma=3
unstable_karma=-3

# Automatically close bugs when this marked as stable
close_bugs=True

# Suggest that users restart after update
suggest_reboot=False

======

Additionally, you may opt to use the bodhi web interface to submit updates:

https://bodhi.fedoraproject.org/updates/new

Comment 2 Zdenek Dohnal 2017-11-02 14:54:00 UTC
Upstream replies about this issue on vim_dev mailing list:

"This is working as intended, Vim does not use umask this way.
Umask is only used by simple commands such as cp, not by long running
processes that deal with many files.

Problem is with the user expectations."

IMHO it is correct behavior - when I take Kurt example from http://www.openwall.com/lists/oss-security/2017/10/31/15 , IMO it makes no sense for swp file to have any permissions or have other permissions then 'read' for 'group' and 'other'. Because only user, which opened file, should have access to write into swp file (that means to write into actual file) - 'read' permission is set for other users/groups, so they can open actual file readonly (if they had 'write' permission, collisions and inconsistencies will be made). If this readonly access can be consider as risk, solution which came to mind is (I wrote upstream about it) to have a way how to set file permissions for swap files. If this feature won't meet upstream expectation, I'll close this issue as WONTFIX, because its fixing will diverge from upstream functionality.

Comment 3 Zdenek Dohnal 2017-11-30 15:32:49 UTC
Upstream created patch 1263, which changes group of swap. They will not fix umask issue, because it is not applicable to complex apps like VIm.


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