diff options
author | Thiruvadi Rajaraman <trajaraman@mvista.com> | 2017-11-04 10:39:42 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-11-21 14:43:55 +0000 |
commit | 7039d1ad320d3bb48c0b031340ceb8a5cd273290 (patch) | |
tree | ae69025c39360ebdf05f15d7a279a4e0db92349d /meta/recipes-devtools/ruby/ruby | |
parent | 7f7e00483a1c1e45e1104035433cb2981214e777 (diff) | |
download | poky-7039d1ad320d3bb48c0b031340ceb8a5cd273290.tar.gz |
ruby: Secruity fix for CVE-2017-9226
affects ruby < 2.4.1
(From OE-Core rev: 0c1eec0c6a789e1e9dbfcc66c3fb8c7d1d8b4e99)
Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/ruby/ruby')
-rw-r--r-- | meta/recipes-devtools/ruby/ruby/CVE-2017-9226.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2017-9226.patch b/meta/recipes-devtools/ruby/ruby/CVE-2017-9226.patch new file mode 100644 index 0000000000..fc783e8a15 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2017-9226.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | commit f015fbdd95f76438cd86366467bb2b39870dd7c6 | ||
2 | Author: K.Kosako <kosako@sofnec.co.jp> | ||
3 | Date: Fri May 19 15:44:47 2017 +0900 | ||
4 | |||
5 | fix #55 : Byte value expressed in octal must be smaller than 256 | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | CVE: CVE-2017-9226 | ||
10 | Signed-off-by: Thiruvadi Rajaraman <tajaraman@mvista.com> | ||
11 | |||
12 | Index: ruby-2.2.5/regparse.c | ||
13 | =================================================================== | ||
14 | --- ruby-2.2.5.orig/regparse.c 2017-09-12 16:33:21.977835068 +0530 | ||
15 | +++ ruby-2.2.5/regparse.c 2017-09-12 16:34:40.987117744 +0530 | ||
16 | @@ -3222,7 +3222,7 @@ | ||
17 | PUNFETCH; | ||
18 | prev = p; | ||
19 | num = scan_unsigned_octal_number(&p, end, 3, enc); | ||
20 | - if (num < 0) return ONIGERR_TOO_BIG_NUMBER; | ||
21 | + if (num < 0 || num >= 256) return ONIGERR_TOO_BIG_NUMBER; | ||
22 | if (p == prev) { /* can't read nothing. */ | ||
23 | num = 0; /* but, it's not error */ | ||
24 | } | ||
25 | @@ -3676,7 +3676,7 @@ | ||
26 | if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) { | ||
27 | prev = p; | ||
28 | num = scan_unsigned_octal_number(&p, end, (c == '0' ? 2:3), enc); | ||
29 | - if (num < 0) return ONIGERR_TOO_BIG_NUMBER; | ||
30 | + if (num < 0 || num >= 256) return ONIGERR_TOO_BIG_NUMBER; | ||
31 | if (p == prev) { /* can't read nothing. */ | ||
32 | num = 0; /* but, it's not error */ | ||
33 | } | ||