* [PATCH 0/1] Vim CVE-2017-5953
@ 2017-02-13 22:33 Leo Famulari
2017-02-13 22:33 ` [PATCH 1/1] gnu: vim: Fix CVE-2017-5953 Leo Famulari
0 siblings, 1 reply; 4+ messages in thread
From: Leo Famulari @ 2017-02-13 22:33 UTC (permalink / raw)
To: guix-devel
This patch adapts a commit from the Vim repository to fix CVE-2017-5953.
One the Vim commit's web page, you can see a question about whether or
not the change is correct:
https://github.com/vim/vim/commit/399c297aa93afe2c0a39e2a1b3f972aebba44c9d
Leo Famulari (1):
gnu: vim: Fix CVE-2017-5953.
gnu/local.mk | 1 +
gnu/packages/patches/vim-CVE-2017-5953.patch | 36 ++++++++++++++++++++++++++++
gnu/packages/vim.scm | 1 +
3 files changed, 38 insertions(+)
create mode 100644 gnu/packages/patches/vim-CVE-2017-5953.patch
--
2.11.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] gnu: vim: Fix CVE-2017-5953.
2017-02-13 22:33 [PATCH 0/1] Vim CVE-2017-5953 Leo Famulari
@ 2017-02-13 22:33 ` Leo Famulari
2017-02-14 16:21 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Leo Famulari @ 2017-02-13 22:33 UTC (permalink / raw)
To: guix-devel
* gnu/packages/patches/vim-CVE-2017-5953.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/vim.scm (vim)[source]: Use it.
---
gnu/local.mk | 1 +
gnu/packages/patches/vim-CVE-2017-5953.patch | 36 ++++++++++++++++++++++++++++
gnu/packages/vim.scm | 1 +
3 files changed, 38 insertions(+)
create mode 100644 gnu/packages/patches/vim-CVE-2017-5953.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 0e8d90110..8e5555a1a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -951,6 +951,7 @@ dist_patch_DATA = \
%D%/packages/patches/util-linux-tests.patch \
%D%/packages/patches/upower-builddir.patch \
%D%/packages/patches/valgrind-enable-arm.patch \
+ %D%/packages/patches/vim-CVE-2017-5953.patch \
%D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch \
%D%/packages/patches/vorbis-tools-CVE-2014-9640.patch \
%D%/packages/patches/vorbis-tools-CVE-2015-6749.patch \
diff --git a/gnu/packages/patches/vim-CVE-2017-5953.patch b/gnu/packages/patches/vim-CVE-2017-5953.patch
new file mode 100644
index 000000000..69f93d9af
--- /dev/null
+++ b/gnu/packages/patches/vim-CVE-2017-5953.patch
@@ -0,0 +1,36 @@
+Fix CVE-2017-5953:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5953
+https://groups.google.com/forum/#!topic/vim_dev/t-3RSdEnrHY
+
+Patch adapted from upstream source repository:
+
+https://github.com/vim/vim/commit/399c297aa93afe2c0a39e2a1b3f972aebba44c9d
+
+From 399c297aa93afe2c0a39e2a1b3f972aebba44c9d Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar <Bram@vim.org>
+Date: Thu, 9 Feb 2017 21:07:12 +0100
+Subject: [PATCH] patch 8.0.0322: possible overflow with corrupted spell file
+
+Problem: Possible overflow with spell file where the tree length is
+ corrupted.
+Solution: Check for an invalid length (suggested by shqking)
+---
+ src/spellfile.c | 3 +++
+ src/version.c | 2 ++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/src/spellfile.c b/src/spellfile.c
+index c7d87c6..8b1a3a6 100644
+--- a/src/spellfile.c
++++ b/src/spellfile.c
+@@ -1595,6 +1595,9 @@ spell_read_tree(
+ len = get4c(fd);
+ if (len < 0)
+ return SP_TRUNCERROR;
++ if (len >= 0x3ffffff)
++ /* Invalid length, multiply with sizeof(int) would overflow. */
++ return SP_FORMERROR;
+ if (len > 0)
+ {
+ /* Allocate the byte array. */
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index f042aba93..cdb32ac7e 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -63,6 +63,7 @@
(uri (string-append "https://github.com/vim/vim/archive/v"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
+ (patches (search-patches "vim-CVE-2017-5953.patch"))
(sha256
(base32
"04samk2bakyixbxyc3p0g6ypls45105sikibg0wc6lmak9bqjs85"))))
--
2.11.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] gnu: vim: Fix CVE-2017-5953.
2017-02-13 22:33 ` [PATCH 1/1] gnu: vim: Fix CVE-2017-5953 Leo Famulari
@ 2017-02-14 16:21 ` Ludovic Courtès
2017-02-14 19:28 ` Leo Famulari
0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2017-02-14 16:21 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
Leo Famulari <leo@famulari.name> skribis:
> * gnu/packages/patches/vim-CVE-2017-5953.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/vim.scm (vim)[source]: Use it.
Go for it!
Thanks,
Ludo'.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] gnu: vim: Fix CVE-2017-5953.
2017-02-14 16:21 ` Ludovic Courtès
@ 2017-02-14 19:28 ` Leo Famulari
0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2017-02-14 19:28 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
On Tue, Feb 14, 2017 at 05:21:10PM +0100, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> skribis:
>
> > * gnu/packages/patches/vim-CVE-2017-5953.patch: New file.
> > * gnu/local.mk (dist_patch_DATA): Add it.
> > * gnu/packages/vim.scm (vim)[source]: Use it.
I corrected the upstream mistake and pushed as
1ae04e35111f1455134943ee098f39e55aebc3eb.
I expect there will be a further upstream update to this fix.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-02-14 19:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-13 22:33 [PATCH 0/1] Vim CVE-2017-5953 Leo Famulari
2017-02-13 22:33 ` [PATCH 1/1] gnu: vim: Fix CVE-2017-5953 Leo Famulari
2017-02-14 16:21 ` Ludovic Courtès
2017-02-14 19:28 ` Leo Famulari
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).