Skip to contentSkip to conversation

xlib_libXfont{, 2}: add upstream security fixes

PATCH New Peter Korsgaard 1 participant 3 messages Oct 10, 2017 – Oct 17, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xlib_libXfont{, 2}: add upstream security fixes

Fixes the following security issues:

CVE-2017-13720 - Check for end of string in PatternMatch

CVE-2017-13722 - pcfGetProperties: Check string boundaries

---
 ...nd-of-string-in-PatternMatch-CVE-2017-137.patch | 34 ++++++++++++++
 ...rties-Check-string-boundaries-CVE-2017-13.patch | 52 ++++++++++++++++++++++
 ...nd-of-string-in-PatternMatch-CVE-2017-137.patch | 34 ++++++++++++++
 ...rties-Check-string-boundaries-CVE-2017-13.patch | 52 ++++++++++++++++++++++
 4 files changed, 172 insertions(+)
 create mode 100644 package/x11r7/xlib_libXfont/0001-Check-for-end-of-string-in-PatternMatch-CVE-2017-137.patch
 create mode 100644 package/x11r7/xlib_libXfont/0002-pcfGetProperties-Check-string-boundaries-CVE-2017-13.patch
 create mode 100644 package/x11r7/xlib_libXfont2/0001-Check-for-end-of-string-in-PatternMatch-CVE-2017-137.patch
 create mode 100644 package/x11r7/xlib_libXfont2/0002-pcfGetProperties-Check-string-boundaries-CVE-2017-13.patch
package/x11r7/xlib_libXfont/0001-Check-for-end-of-string-in-PatternMatch-CVE-2017-137.patch new file +34 -0
new file mode 100644
index 0000000000..3795179af1
@@ -0,0 +1,34 @@
+From d1e670a4a8704b8708e493ab6155589bcd570608 Mon Sep 17 00:00:00 2001
+From: Michal Srb <[email protected]>
+Date: Thu, 20 Jul 2017 13:38:53 +0200
+Subject: [PATCH] Check for end of string in PatternMatch (CVE-2017-13720)
+
+If a pattern contains '?' character, any character in the string is skipped,
+even if it is '\0'. The rest of the matching then reads invalid memory.
+
+Reviewed-by: Peter Hutterer <[email protected]>
+Signed-off-by: Julien Cristau <[email protected]>
+Signed-off-by: Peter Korsgaard <[email protected]>
+---
+ src/fontfile/fontdir.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/fontfile/fontdir.c b/src/fontfile/fontdir.c
+index 4ce2473..996b7d1 100644
+--- a/src/fontfile/fontdir.c
++++ b/src/fontfile/fontdir.c
+@@ -400,8 +400,10 @@ PatternMatch(char *pat, int patdashes, char *string, int stringdashes)
+ 		}
+ 	    }
+ 	case '?':
+-	    if (*string++ == XK_minus)
++	    if ((t = *string++) == XK_minus)
+ 		stringdashes--;
++	    if (!t)
++		return 0;
+ 	    break;
+ 	case '\0':
+ 	    return (*string == '\0');
+-- 
+2.11.0
+
package/x11r7/xlib_libXfont/0002-pcfGetProperties-Check-string-boundaries-CVE-2017-13.patch new file +52 -0

52 lines not on this page · raw message

package/x11r7/xlib_libXfont2/0001-Check-for-end-of-string-in-PatternMatch-CVE-2017-137.patch new file +34 -0
new file mode 100644
index 0000000000..3795179af1
@@ -0,0 +1,34 @@
+From d1e670a4a8704b8708e493ab6155589bcd570608 Mon Sep 17 00:00:00 2001
+From: Michal Srb <[email protected]>
+Date: Thu, 20 Jul 2017 13:38:53 +0200
+Subject: [PATCH] Check for end of string in PatternMatch (CVE-2017-13720)
+
+If a pattern contains '?' character, any character in the string is skipped,
+even if it is '\0'. The rest of the matching then reads invalid memory.
+
+Reviewed-by: Peter Hutterer <[email protected]>
+Signed-off-by: Julien Cristau <[email protected]>
+Signed-off-by: Peter Korsgaard <[email protected]>
+---
+ src/fontfile/fontdir.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/fontfile/fontdir.c b/src/fontfile/fontdir.c
+index 4ce2473..996b7d1 100644
+--- a/src/fontfile/fontdir.c
++++ b/src/fontfile/fontdir.c
+@@ -400,8 +400,10 @@ PatternMatch(char *pat, int patdashes, char *string, int stringdashes)
+ 		}
+ 	    }
+ 	case '?':
+-	    if (*string++ == XK_minus)
++	    if ((t = *string++) == XK_minus)
+ 		stringdashes--;
++	    if (!t)
++		return 0;
+ 	    break;
+ 	case '\0':
+ 	    return (*string == '\0');
+-- 
+2.11.0
+
package/x11r7/xlib_libXfont2/0002-pcfGetProperties-Check-string-boundaries-CVE-2017-13.patch new file +52 -0

52 lines not on this page · raw message

Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 xlib_libXfont{, 2}: add upstream security fixes

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

Fixes the following security issues:
CVE-2017-13720 - Check for end of string in PatternMatch

CVE-2017-13722 - pcfGetProperties: Check string boundaries

Committed to 2017.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 xlib_libXfont{, 2}: add upstream security fixes

In reply to Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

Fixes the following security issues:
CVE-2017-13720 - Check for end of string in PatternMatch

CVE-2017-13722 - pcfGetProperties: Check string boundaries

Committed to 2017.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard