]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
ruby: Security fix for CVE-2017-9228
authorThiruvadi Rajaraman <trajaraman@mvista.com>
Sat, 4 Nov 2017 17:37:48 +0000 (10:37 -0700)
committerArmin Kuster <akuster808@gmail.com>
Thu, 22 Feb 2018 19:10:34 +0000 (11:10 -0800)
affects ruby < 2.4.1

Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
(cherry picked from commit cdfb60a7b573c034868ef27d8eb2c667f2a7ad1d)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-devtools/ruby/ruby/CVE-2017-9228.patch [new file with mode: 0644]
meta/recipes-devtools/ruby/ruby_2.2.5.bb

diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2017-9228.patch b/meta/recipes-devtools/ruby/ruby/CVE-2017-9228.patch
new file mode 100644 (file)
index 0000000..dc911bb
--- /dev/null
@@ -0,0 +1,26 @@
+commit 3b63d12038c8d8fc278e81c942fa9bec7c704c8b
+Author: K.Kosako <kosako@sofnec.co.jp>
+Date:   Wed May 24 13:43:25 2017 +0900
+
+    fix #60 : invalid state(CCS_VALUE) in parse_char_class()
+
+Upstream-Status: Backport
+
+CVE: CVE-2017-9228
+Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
+
+Index: ruby-2.2.5/regparse.c
+===================================================================
+--- ruby-2.2.5.orig/regparse.c 2014-09-16 08:14:10.000000000 +0530
++++ ruby-2.2.5/regparse.c      2017-08-30 11:58:25.774275722 +0530
+@@ -4458,7 +4458,9 @@
+     }
+   }
+-  *state = CCS_VALUE;
++  if (*state != CCS_START)
++    *state = CCS_VALUE;
++
+   *type  = CCV_CLASS;
+   return 0;
+ }
index dafeab5b1aceec2308ff1a6b5f9281d444a3757f..26cecb2f87a1d2ae2cf13425d53db1c62ff6883b 100644 (file)
@@ -6,6 +6,7 @@ SRC_URI[sha256sum] = "30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c03c
 SRC_URI += "file://prevent-gc.patch \
             file://CVE-2016-7798.patch \
             file://CVE-2017-9227.patch \
+            file://CVE-2017-9228.patch \
 "
 
 # it's unknown to configure script, but then passed to extconf.rb