diff options
Diffstat (limited to 'meta/recipes-devtools/ruby/ruby/CVE-2017-9227.patch')
-rw-r--r-- | meta/recipes-devtools/ruby/ruby/CVE-2017-9227.patch | 24 |
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 @@ | |||
1 | commit 9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814 | ||
2 | Author: K.Kosako <kosako@sofnec.co.jp> | ||
3 | Date: Tue May 23 16:15:35 2017 +0900 | ||
4 | |||
5 | fix #58 : access to invalid address by reg->dmin value | ||
6 | |||
7 | Upstream-Status: backport | ||
8 | |||
9 | CVE: CVE-2017-9227 | ||
10 | Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com> | ||
11 | |||
12 | Index: 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 | } | ||