Bug 2135411 (CVE-2022-32221)

Summary: CVE-2022-32221 curl: POST following PUT confusion
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: csutherl, dffrench, ggasparb, gzaronik, jburrell, jclere, jpazdziora, jwon, kdudka, mturk, ngough, peholase, pjindal, plodge, pmatouse, rgodfrey, saroy, security-response-team, szappis
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: curl 7.86.0, libcurl 7.86.0 Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in curl. The issue occurs when doing HTTP(S) transfers, where curl might erroneously use the read callback (`CURLOPT_READFUNCTION`) to ask for data to send, even when the `CURLOPT_POSTFIELDS` option has been set if it previously used the same handle to issue a `PUT` request which used that callback. This flaw may surprise the application and cause it to misbehave and either send off the wrong data or use memory after free or similar in the subsequent `POST` request.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 15:16:52 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: 2135686, 2135687, 2137780, 2137781, 2153064, 2153065, 2214845    
Bug Blocks: 2135407    

Description Marian Rehak 2022-10-17 15:03:41 UTC
when doing HTTP(S) transfers, libcurl might erroneously use the read callback (`CURLOPT_READFUNCTION`) to ask for data to send, even when the `CURLOPT_POSTFIELDS` option has been set, if the same handle previously was used to issue a `PUT` request which used that callback. This flaw may surprise the application and cause it to misbehave and either send off the wrong data or use memory after free or similar in the subsequent `POST` request.

Reference:

https://curl.se/docs/CVE-2022-32221.html

Comment 4 Sandipan Roy 2022-10-26 07:43:03 UTC
Created curl tracking bugs for this issue:

Affects: fedora-all [bug 2137780]


Created mingw-curl tracking bugs for this issue:

Affects: fedora-all [bug 2137781]

Comment 6 errata-xmlrpc 2022-12-08 13:07:19 UTC
This issue has been addressed in the following products:

  JBoss Core Services on RHEL 7
  JBoss Core Services for RHEL 8

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

Comment 7 errata-xmlrpc 2022-12-08 13:22:26 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Core Services

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

Comment 9 Anten Skrabec 2022-12-13 22:06:15 UTC
Created davix tracking bugs for this issue:

Affects: epel-all [bug 2153064]
Affects: fedora-all [bug 2153065]

Comment 10 errata-xmlrpc 2023-01-23 15:21:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:0333 https://access.redhat.com/errata/RHSA-2023:0333

Comment 11 Product Security DevOps Team 2023-05-09 15:16:50 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-2022-32221

Comment 13 errata-xmlrpc 2023-07-18 08:28:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Extended Update Support

Via RHSA-2023:4139 https://access.redhat.com/errata/RHSA-2023:4139

Comment 14 Jan Pazdziora 2023-07-25 14:32:16 UTC
Hello,

while doing review of the Vulnerability Assessment report of RHEL 8.6 for the purpose of Common Criteria certification, we came across this CVE-2022-32221. The CVE page https://access.redhat.com/security/cve/CVE-2022-32221 lists RHEL 8 as Not affected.

However, in RHEL 8.6 we see libcurl-7.61.1-22.el8 and comment 1 says

  - Affected versions: libcurl 7.7 to and including 7.85.0

What is the reason why we consider RHEL 8 (which has curl and libcurl within this version range) not affected?

Thank you, Jan