From: "Steve Sakoman" <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][dunfell 10/12] ruby: fix CVE-2020-25613
Date: Sun, 8 Nov 2020 16:56:17 -1000 [thread overview]
Message-ID: <80077479fd687a887cd321fe2e65dfd58edb5832.1604890441.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1604890441.git.steve@sakoman.com>
From: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
.../ruby/ruby/CVE-2020-25613.patch | 40 +++++++++++++++++++
meta/recipes-devtools/ruby/ruby_2.7.1.bb | 1 +
2 files changed, 41 insertions(+)
create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2020-25613.patch
diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2020-25613.patch b/meta/recipes-devtools/ruby/ruby/CVE-2020-25613.patch
new file mode 100644
index 0000000000..1abcb7547e
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/CVE-2020-25613.patch
@@ -0,0 +1,40 @@
+From 8946bb38b4d87549f0d99ed73c62c41933f97cc7 Mon Sep 17 00:00:00 2001
+From: Yusuke Endoh <mame@ruby-lang.org>
+Date: Tue, 29 Sep 2020 13:15:58 +0900
+Subject: [PATCH] Make it more strict to interpret some headers
+
+Some regexps were too tolerant.
+
+Upstream-Status: Backport
+[https://github.com/ruby/webrick/commit/8946bb38b4d87549f0d99ed73c62c41933f97cc7]
+CVE: CVE-2020-25613
+Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
+---
+ lib/webrick/httprequest.rb | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/webrick/httprequest.rb b/lib/webrick/httprequest.rb
+index 294bd91..d34eac7 100644
+--- a/lib/webrick/httprequest.rb
++++ b/lib/webrick/httprequest.rb
+@@ -227,9 +227,9 @@ def parse(socket=nil)
+ raise HTTPStatus::BadRequest, "bad URI `#{@unparsed_uri}'."
+ end
+
+- if /close/io =~ self["connection"]
++ if /\Aclose\z/io =~ self["connection"]
+ @keep_alive = false
+- elsif /keep-alive/io =~ self["connection"]
++ elsif /\Akeep-alive\z/io =~ self["connection"]
+ @keep_alive = true
+ elsif @http_version < "1.1"
+ @keep_alive = false
+@@ -508,7 +508,7 @@ def read_body(socket, block)
+ return unless socket
+ if tc = self['transfer-encoding']
+ case tc
+- when /chunked/io then read_chunked(socket, block)
++ when /\Achunked\z/io then read_chunked(socket, block)
+ else raise HTTPStatus::NotImplemented, "Transfer-Encoding: #{tc}."
+ end
+ elsif self['content-length'] || @remaining_size
diff --git a/meta/recipes-devtools/ruby/ruby_2.7.1.bb b/meta/recipes-devtools/ruby/ruby_2.7.1.bb
index 3dd9fb0a62..f87686f6f7 100644
--- a/meta/recipes-devtools/ruby/ruby_2.7.1.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.7.1.bb
@@ -6,6 +6,7 @@ SRC_URI += " \
file://remove_has_include_macros.patch \
file://run-ptest \
file://0001-Modify-shebang-of-libexec-y2racc-and-libexec-racc2y.patch \
+ file://CVE-2020-25613.patch \
"
SRC_URI[md5sum] = "debb9c325bf65021214451660f46e909"
--
2.17.1
next prev parent reply other threads:[~2020-11-09 2:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 2:56 [OE-core][dunfell 00/12] Patch review Steve Sakoman
2020-11-09 2:56 ` [OE-core][dunfell 01/12] meta: fix some unresponsive homepages and bugtracker links Steve Sakoman
2020-11-09 2:56 ` [OE-core][dunfell 02/12] qemuboot.bbclass: Fix a typo Steve Sakoman
2020-11-09 2:56 ` [OE-core][dunfell 03/12] update_udev_hwdb: clean hwdb.bin Steve Sakoman
2020-11-09 2:56 ` [OE-core][dunfell 04/12] linux-firmware: add Amlogic VDEC firmware package Steve Sakoman
2020-11-09 2:56 ` [OE-core][dunfell 05/12] linux-firmware: package marvel sdio 8997 firmware Steve Sakoman
2020-11-09 2:56 ` [OE-core][dunfell 06/12] linux-firmware: package nvidia firmware Steve Sakoman
2020-11-09 2:56 ` [OE-core][dunfell 07/12] linux-firmware: upgrade 20200817 -> 20201022 Steve Sakoman
2020-11-09 2:56 ` [OE-core][dunfell 08/12] netbase: update SRC_URI to reflect new file name Steve Sakoman
2020-11-09 2:56 ` [OE-core][dunfell 09/12] netbase: bump PE to purge bogus hash equivalence from autobuilder Steve Sakoman
2020-11-09 2:56 ` Steve Sakoman [this message]
2020-11-09 2:56 ` [OE-core][dunfell 11/12] grub: fix several CVEs in grub 2.04 Steve Sakoman
2020-11-09 2:56 ` [OE-core][dunfell 12/12] grub: clean up CVE patches Steve Sakoman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80077479fd687a887cd321fe2e65dfd58edb5832.1604890441.git.steve@sakoman.com \
--to=steve@sakoman.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox