aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/ruby/ruby/CVE-2017-9228.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/ruby/ruby/CVE-2017-9228.patch')
-rw-r--r--meta/recipes-devtools/ruby/ruby/CVE-2017-9228.patch26
1 files changed, 26 insertions, 0 deletions
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
index 0000000000..dc911bb20b
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/CVE-2017-9228.patch
@@ -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;
+ }