Bug 2034674 (CVE-2021-44790)

Summary: CVE-2021-44790 httpd: mod_lua: Possible buffer overflow when parsing multipart content
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: high Docs Contact:
Priority: high    
Version: unspecifiedCC: anon.amish, asoldano, atangrin, bbaranow, bmaxwell, brian.stansberry, caswilli, cdewolf, chaekim, chazlett, csutherl, darran.lofthouse, dkreling, dmasirka, dosoudil, eleandro, fjansen, fjuma, gzaronik, hhorak, icesalov, iweiss, jburrell, jclere, jkaluza, jnakfour, jochrist, jorton, jpallich, jperkins, jwong, jwon, kaycoth, krathod, kwills, kyoshida, leiyu, lgao, luhliari, micjohns, miturria, msochure, msvehla, mturk, nico.van.roijen, ntait, nwallace, pahan, pjindal, pmackay, rguimara, rstancel, rsvoboda, salanis, smaestri, sthirugn, szappis, tcullum, tom.jenkinson, tony, yborgess, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: httpd 2.4.52 Doc Type: If docs needed, set a value
Doc Text:
A buffer overflow flaw in httpd's lua module could allow an out-of-bounds write. An attacker who is able to submit a crafted request to an httpd instance that is using the lua module may be able to cause an impact to confidentiality, integrity, and/or availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-27 10:01:20 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: 2034675, 2035056, 2035057, 2035058, 2035059, 2035060, 2035061, 2035062, 2035063, 2035064, 2035092, 2061683, 2061684, 2067196, 2067197    
Bug Blocks: 2034676    

Description Guilherme de Almeida Suckevicz 2021-12-21 16:53:46 UTC
A carefully crafted request body can cause a buffer overflow in the mod_lua multipart parser (r:parsebody() called from Lua scripts). The Apache httpd team is not aware of an exploit for the vulnerabilty though it might be possible to craft one. This issue affects Apache HTTP Server 2.4.51 and earlier.

References:
http://httpd.apache.org/security/vulnerabilities_24.html
http://www.openwall.com/lists/oss-security/2021/12/20/4

Comment 1 Guilherme de Almeida Suckevicz 2021-12-21 16:54:07 UTC
Created httpd tracking bugs for this issue:

Affects: fedora-all [bug 2034675]

Comment 2 Todd Cullum 2021-12-22 02:40:05 UTC
Likely upstream patch: https://svn.apache.org/viewvc?view=revision&revision=1896039

Comment 3 Ted Jongseok Won 2021-12-22 07:40:34 UTC
This vulnerability is out of security support scope for the following product:
 * Red Hat JBoss Enterprise Application Platform 6

Please refer to https://access.redhat.com/support/policy/updates/jboss_notes for more details.

Comment 5 Todd Cullum 2021-12-22 19:36:25 UTC
Flaw summary:

Evidently, in the req_parsebody() routine in lua_request.c of the lua module, it was possible for vlen to be set to <= 0. vlen is used in a memory allocation and memcpy call, as well as to push data to a stack. Having a vlen <= 0 could cause an allocation that is too small or large, because vlen is size_t. The upstream patch adds the check `if (end - crlf <= 8) break;` to the loop to exit the loop before using an invalid vlen.

Comment 16 errata-xmlrpc 2022-01-17 09:01:11 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 17 errata-xmlrpc 2022-01-25 13:22:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support
  Red Hat Enterprise Linux 8.4 Extended Update Support
  Red Hat Enterprise Linux 8

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

Comment 18 errata-xmlrpc 2022-01-26 14:35:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions

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

Comment 19 errata-xmlrpc 2022-01-27 09:20:39 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7

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

Comment 20 Product Security DevOps Team 2022-01-27 10:00:53 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-2021-44790

Comment 23 errata-xmlrpc 2022-03-30 09:37:20 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.6 Advanced Update Support
  Red Hat Enterprise Linux 7.6 Update Services for SAP Solutions
  Red Hat Enterprise Linux 7.6 Telco Extended Update Support

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

Comment 24 errata-xmlrpc 2022-03-30 09:39:07 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.7 Advanced Update Support
  Red Hat Enterprise Linux 7.7 Update Services for SAP Solutions
  Red Hat Enterprise Linux 7.7 Telco Extended Update Support

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

Comment 25 errata-xmlrpc 2022-03-30 10:37:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.3 Advanced Update Support

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

Comment 26 errata-xmlrpc 2022-03-30 10:40:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.4 Advanced Update Support

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