Bug 1773728 (CVE-2019-16201)

Summary: CVE-2019-16201 ruby: Regular expression denial of service vulnerability of WEBrick's Digest authentication
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: amasferr, chazlett, hhorak, jorton, mo, mtasaka, pvalena, ruby-maint, ruby-packagers-sig, s, strzibny, vanmeeuwen+fedora, vondruch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ruby 2.4.8, ruby 2.5.7, ruby 2.6.5, ruby 2.7.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-26 11:32:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1773729, 1784828, 1784829, 1784830, 1784831, 1784832, 1784833, 1954946, 1955049, 1957125, 2055233, 2055242    
Bug Blocks: 1773730    

Description Guilherme de Almeida Suckevicz 2019-11-18 19:49:28 UTC
Regular expression denial of service vulnerability of WEBrick’s Digest authentication module was found. An attacker can exploit this vulnerability to cause an effective denial of service against a WEBrick service.

Reference:
https://www.ruby-lang.org/en/news/2019/10/01/webrick-regexp-digestauth-dos-cve-2019-16201/

Comment 1 Guilherme de Almeida Suckevicz 2019-11-18 19:49:48 UTC
Created ruby tracking bugs for this issue:

Affects: fedora-all [bug 1773729]

Comment 3 Marco Benatto 2019-12-17 19:11:15 UTC
Upstream patch for this issue:

https://github.com/ruby/ruby/commit/36e057e26ef2104bc2349799d6c52d22bb1c7d03

commit 36e057e26ef2104bc2349799d6c52d22bb1c7d03
Author: Nobuyoshi Nakada <nobu>
Date:   Tue Aug 13 12:14:28 2019 +0900

    Loop with String#scan without creating substrings

    Create the substrings necessary parts only, instead of cutting the
    rest of the buffer.  Also removed a useless, probable typo, regexp.

Comment 6 Marco Benatto 2019-12-18 12:36:51 UTC
There's an issue with HTTPAuth when using AuthDigest mode in Ruby and webricks. When using DigestAuth HTTP authentication method, ruby uses a regular expression to split the session parameters in split_param_value() function. There's a flaw on the regular expression mentioned earlier which an attacker may leverage by sending a crafted message header which leads the regular expression to a heavily CPU consuming backtracking resulting in DoS.

Comment 7 errata-xmlrpc 2021-05-25 13:14:02 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

Via RHSA-2021:2104 https://access.redhat.com/errata/RHSA-2021:2104

Comment 8 Product Security DevOps Team 2021-05-26 11:32:01 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2019-16201

Comment 9 errata-xmlrpc 2021-06-03 11:25:49 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

Via RHSA-2021:2230 https://access.redhat.com/errata/RHSA-2021:2230

Comment 10 errata-xmlrpc 2021-06-29 16:03:19 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:2587 https://access.redhat.com/errata/RHSA-2021:2587

Comment 11 errata-xmlrpc 2021-06-29 16:03:56 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:2588 https://access.redhat.com/errata/RHSA-2021:2588

Comment 12 errata-xmlrpc 2022-02-21 10:10:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions

Via RHSA-2022:0581 https://access.redhat.com/errata/RHSA-2022:0581

Comment 13 errata-xmlrpc 2022-02-21 10:11:50 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2022:0582 https://access.redhat.com/errata/RHSA-2022:0582