diff options
author | Joe Slater <jslater@windriver.com> | 2017-08-16 14:46:11 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-18 10:40:26 +0100 |
commit | 391127b00291bddba010813f9e033a31290c3b66 (patch) | |
tree | bfba3bfa4b786b3dfb830721d8c48febd14c180a /meta/recipes-devtools/ruby/ruby | |
parent | f14f918d9db871cb91811a4f28e42b317634aab4 (diff) | |
download | poky-391127b00291bddba010813f9e033a31290c3b66.tar.gz |
ruby: fix CVE-2017-9224
Use DATA_ENSURE(1) before access.
(From OE-Core rev: 9db907a0bd331c47c4882b82f9f1d2a7ef1f6d1f)
Signed-off-by: Joe Slater <jslater@windriver.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/ruby-CVE-2017-9224.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch b/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch new file mode 100644 index 0000000000..848139b7e3 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 690313a061f7a4fa614ec5cc8368b4f2284e059b Mon Sep 17 00:00:00 2001 | ||
2 | From: "K.Kosako" <kosako@sofnec.co.jp> | ||
3 | Date: Tue, 23 May 2017 10:28:58 +0900 | ||
4 | Subject: [PATCH] fix #57 : DATA_ENSURE() check must be before data access | ||
5 | |||
6 | --- | ||
7 | regexec.c | 5 ----- | ||
8 | 1 file changed, 5 deletions(-) | ||
9 | |||
10 | --- end of original header | ||
11 | |||
12 | CVE: CVE-2017-9224 | ||
13 | |||
14 | Context modified so that patch applies for version 2.4.1. | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
18 | |||
19 | |||
20 | diff --git a/regexec.c b/regexec.c | ||
21 | index 35fef11..d4e577d 100644 | ||
22 | --- a/regexec.c | ||
23 | +++ b/regexec.c | ||
24 | @@ -1473,14 +1473,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, | ||
25 | NEXT; | ||
26 | |||
27 | CASE(OP_EXACT1) MOP_IN(OP_EXACT1); | ||
28 | -#if 0 | ||
29 | DATA_ENSURE(1); | ||
30 | if (*p != *s) goto fail; | ||
31 | p++; s++; | ||
32 | -#endif | ||
33 | - if (*p != *s++) goto fail; | ||
34 | - DATA_ENSURE(0); | ||
35 | - p++; | ||
36 | MOP_OUT; | ||
37 | break; | ||
38 | |||
39 | -- | ||
40 | 1.7.9.5 | ||
41 | |||