Bug 1970902 (CVE-2021-22925)

Summary: CVE-2021-22925 curl: Incorrect fix for CVE-2021-22898 TELNET stack contents disclosure
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: amctagga, andrew.slice, anharris, bniver, bodavis, csutherl, dbhole, drusek, erik-fedora, flucifre, gmeno, gzaronik, hhorak, hvyas, jclere, jorton, jwon, kanderso, kdudka, krathod, luhliari, lvaleeva, mbenjamin, mhackett, mike, msekleta, mturk, omajid, paul, pjindal, rwagner, security-response-team, sostapov, svashisht, szappis, vereddy
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: curl 7.78.0 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the way curl handled telnet protocol option for sending environment variables, which could lead to sending of uninitialized data from a stack-based buffer to the server. This issue leads to potentially revealing sensitive internal information to the server using a clear-text network protocol.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 23:22:48 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: 1970934, 1970935, 1970936, 1984328, 1984329    
Bug Blocks: 1970904    

Description Tomas Hoger 2021-06-11 12:33:06 UTC
CVE-2021-22898: TELNET stack contents disclosure (see bug 1964887) issue was recently reported for curl and it was addressed in curl 7.77.0:

https://curl.se/docs/CVE-2021-22898.html
https://github.com/curl/curl/commit/39ce47f219b09c380b81f89fe54ac586c8db6bde
https://hackerone.com/reports/1176461

However, the fix applied is not correct and does not completely address the issue.  It helps in cases when long environment variable name is used ('a'*256 + ',b'), but not when the name is short and only the value is long ('a,' + 'b'*256, which is the example mentioned in the curl project advisory).

Long variable values still trigger memory disclosure as described in the original report.

This issue was reported upstream via:

https://hackerone.com/reports/1223882

Comment 5 Marian Rehak 2021-07-21 09:15:32 UTC
Created curl tracking bugs for this issue:

Affects: fedora-all [bug 1984328]


Created mingw-curl tracking bugs for this issue:

Affects: fedora-all [bug 1984329]

Comment 8 errata-xmlrpc 2021-11-09 19:02:45 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 9 Product Security DevOps Team 2021-11-09 23:22:43 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-22925

Comment 10 Tomas Hoger 2022-05-26 11:34:27 UTC
Upstream advisory:
https://curl.se/docs/CVE-2021-22925.html