[mapserver] 01/02: Add upstream patch to fix CVE-2017-5522 (stack buffer overflow).

Bas Couwenberg sebastic at debian.org
Wed Jan 18 21:10:40 UTC 2017


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch jessie
in repository mapserver.

commit 2922e2ed121c007ecb2d560c14b258bf78a6a027
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Wed Jan 18 21:31:13 2017 +0100

    Add upstream patch to fix CVE-2017-5522 (stack buffer overflow).
---
 debian/changelog                   |  6 ++++++
 debian/patches/CVE-2017-5522.patch | 29 +++++++++++++++++++++++++++++
 debian/patches/series              |  1 +
 3 files changed, 36 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index aa1b700..e1f54a0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+mapserver (6.4.1-5+deb8u3) UNRELEASED; urgency=medium
+
+  * Add upstream patch to fix CVE-2017-5522 (stack buffer overflow).
+
+ -- Bas Couwenberg <sebastic at debian.org>  Wed, 18 Jan 2017 21:30:46 +0100
+
 mapserver (6.4.1-5+deb8u2) stable; urgency=medium
 
   * Add upstream patch to fix FTBFS with php >= 5.6.25.
diff --git a/debian/patches/CVE-2017-5522.patch b/debian/patches/CVE-2017-5522.patch
new file mode 100644
index 0000000..cf65324
--- /dev/null
+++ b/debian/patches/CVE-2017-5522.patch
@@ -0,0 +1,29 @@
+Description: security fix (patch by EvenR)
+ Fixes CVE-2017-5522 (stack buffer overflow)
+Author: Even Rouault <even.rouault at spatialys.com>
+Origin: https://github.com/mapserver/mapserver/commit/fb00f8149898fcf9fcb490a179984e481248f066
+        https://github.com/mapserver/mapserver/commit/f096b132e58cdfe2714ce372e9f4f7c76d72c5ec
+
+--- a/mapogcfilter.c
++++ b/mapogcfilter.c
+@@ -2853,6 +2853,9 @@ char *FLTGetIsLikeComparisonExpression(F
+   pszValue = psFilterNode->psRightNode->pszValue;
+   nLength = strlen(pszValue);
+ 
++  if( 1 + 2 * nLength + 1 + 1 >= sizeof(szTmp) )
++    return NULL;
++
+   iTmp =0;
+   if (nLength > 0 && pszValue[0] != pszWild[0] &&
+       pszValue[0] != pszSingle[0] &&
+--- a/mapogcfiltercommon.c
++++ b/mapogcfiltercommon.c
+@@ -93,6 +93,8 @@ char *FLTGetIsLikeComparisonCommonExpres
+ 
+   pszValue = psFilterNode->psRightNode->pszValue;
+   nLength = strlen(pszValue);
++  if( 1 + 2 * nLength + 1 + 1 >= sizeof(szTmp) )
++    return NULL;
+ 
+   iTmp =0;
+   if (nLength > 0 && pszValue[0] != pszWild[0] &&
diff --git a/debian/patches/series b/debian/patches/series
index 80fc925..c8c14d0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ java-hardening.patch
 php56.patch
 0001-Backport-4928-and-5356.patch
 0001-Fix-build-issue-with-php-5.6.25-5318.patch
+CVE-2017-5522.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapserver.git



More information about the Pkg-grass-devel mailing list