summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/ruby/ruby/CVE-2017-9227.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/ruby/ruby/CVE-2017-9227.patch')
-rw-r--r--meta/recipes-devtools/ruby/ruby/CVE-2017-9227.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2017-9227.patch b/meta/recipes-devtools/ruby/ruby/CVE-2017-9227.patch
new file mode 100644
index 0000000000..f6eaefb7fd
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/CVE-2017-9227.patch
@@ -0,0 +1,24 @@
1commit 9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814
2Author: K.Kosako <kosako@sofnec.co.jp>
3Date: Tue May 23 16:15:35 2017 +0900
4
5 fix #58 : access to invalid address by reg->dmin value
6
7Upstream-Status: backport
8
9CVE: CVE-2017-9227
10Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
11
12Index: ruby-2.2.5/regexec.c
13===================================================================
14--- ruby-2.2.5.orig/regexec.c 2014-09-15 21:48:41.000000000 +0530
15+++ ruby-2.2.5/regexec.c 2017-08-30 12:18:04.054828426 +0530
16@@ -3678,6 +3678,8 @@
17 }
18 else {
19 UChar *q = p + reg->dmin;
20+
21+ if (q >= end) return 0; /* fail */
22 while (p < q) p += enclen(reg->enc, p, end);
23 }
24 }