aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiruvadi Rajaraman <trajaraman@mvista.com>2017-11-04 10:35:54 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-21 14:42:57 +0000
commitd83f18936a0eb470e8faf7adbd7c580c23fa3370 (patch)
treecbcb2c8bd8d8b5f9be44345da57196f1cfa7d404
parent6af2319008dc16c61092f71ff227c285aac51288 (diff)
downloadopenembedded-core-d83f18936a0eb470e8faf7adbd7c580c23fa3370.tar.gz
openembedded-core-d83f18936a0eb470e8faf7adbd7c580c23fa3370.tar.bz2
openembedded-core-d83f18936a0eb470e8faf7adbd7c580c23fa3370.zip
ruby: Security fix for CVE-2017-9227
affects ruby < 2.4.1 Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com> Signed-off-by: Armin Kuster <akuster@mvista.com>
-rw-r--r--meta/recipes-devtools/ruby/ruby/CVE-2017-9227.patch24
-rw-r--r--meta/recipes-devtools/ruby/ruby_2.2.5.bb1
2 files changed, 25 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 @@
+commit 9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814
+Author: K.Kosako <kosako@sofnec.co.jp>
+Date: Tue May 23 16:15:35 2017 +0900
+
+ fix #58 : access to invalid address by reg->dmin value
+
+Upstream-Status: backport
+
+CVE: CVE-2017-9227
+Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
+
+Index: ruby-2.2.5/regexec.c
+===================================================================
+--- ruby-2.2.5.orig/regexec.c 2014-09-15 21:48:41.000000000 +0530
++++ ruby-2.2.5/regexec.c 2017-08-30 12:18:04.054828426 +0530
+@@ -3678,6 +3678,8 @@
+ }
+ else {
+ UChar *q = p + reg->dmin;
++
++ if (q >= end) return 0; /* fail */
+ while (p < q) p += enclen(reg->enc, p, end);
+ }
+ }
diff --git a/meta/recipes-devtools/ruby/ruby_2.2.5.bb b/meta/recipes-devtools/ruby/ruby_2.2.5.bb
index 35882d18e6..e29eb9c9b4 100644
--- a/meta/recipes-devtools/ruby/ruby_2.2.5.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.2.5.bb
@@ -5,6 +5,7 @@ SRC_URI[sha256sum] = "30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c03c
SRC_URI += "file://prevent-gc.patch \
file://CVE-2016-7798.patch \
+ file://CVE-2017-9227.patch \
"
# it's unknown to configure script, but then passed to extconf.rb