From 1ae04e35111f1455134943ee098f39e55aebc3eb Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 13 Feb 2017 17:31:23 -0500 Subject: gnu: vim: Fix CVE-2017-5953. * 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/packages/patches/vim-CVE-2017-5953.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 gnu/packages/patches/vim-CVE-2017-5953.patch (limited to 'gnu/packages/patches/vim-CVE-2017-5953.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 0000000000..7b66f1bf16 --- /dev/null +++ b/gnu/packages/patches/vim-CVE-2017-5953.patch @@ -0,0 +1,24 @@ +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 commit, correcting the transcription error +in the bounds check: + +https://github.com/vim/vim/commit/399c297aa93afe2c0a39e2a1b3f972aebba44c9d + +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 >= 0x3fffffff) ++ /* Invalid length, multiply with sizeof(int) would overflow. */ ++ return SP_FORMERROR; + if (len > 0) + { + /* Allocate the byte array. */ -- cgit v1.2.3