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

Bas Couwenberg sebastic at debian.org
Wed Jan 18 20:26:28 UTC 2017


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

sebastic pushed a commit to branch jessie-backports
in repository mapserver.

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

    Add upstream patch to fix CVE-2017-5522 (stack buffer overflow).
---
 debian/changelog                                   |  6 +++++
 .../patches/0001-security-fix-patch-by-EvenR.patch | 27 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 34 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 0b817c3..c864684 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+mapserver (7.0.3-1~bpo8+2) 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:14:48 +0100
+
 mapserver (7.0.3-1~bpo8+1) jessie-backports; urgency=medium
 
   * Rebuild for jessie-backports.
diff --git a/debian/patches/0001-security-fix-patch-by-EvenR.patch b/debian/patches/0001-security-fix-patch-by-EvenR.patch
new file mode 100644
index 0000000..010aefa
--- /dev/null
+++ b/debian/patches/0001-security-fix-patch-by-EvenR.patch
@@ -0,0 +1,27 @@
+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/e52a436c0e1c5e9f7ef13428dba83194a800f4df
+
+--- a/mapogcfilter.c
++++ b/mapogcfilter.c
+@@ -3004,6 +3004,8 @@ 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] &&
+--- a/mapogcfiltercommon.c
++++ b/mapogcfiltercommon.c
+@@ -88,6 +88,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] && pszValue[0] != pszSingle[0] && pszValue[0] != pszEscape[0]) {
diff --git a/debian/patches/series b/debian/patches/series
index 78cc1a1..5dc9dc4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ hardening.patch
 perl-mapscript-install.patch
 ruby-mapscript-install.patch
 java-hardening.patch
+0001-security-fix-patch-by-EvenR.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