Bug 1211233 (CVE-2023-28322) - VUL-0: CVE-2023-28322: curl: POST-after-PUT confusion
Summary: VUL-0: CVE-2023-28322: curl: POST-after-PUT confusion
Status: RESOLVED FIXED
Alias: CVE-2023-28322
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/365644/
Whiteboard: CVSSv3.1:SUSE:CVE-2023-28322:6.5:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-09 12:33 UTC by Thomas Leroy
Modified: 2024-04-15 15:07 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Leroy 2023-05-09 12:33:11 UTC
CVE-2023-28322: more POST-after-PUT confusion
=============================================

Project curl Security Advisory, May 17 2023 -
[Permalink](https://curl.se/docs/CVE-2023-28322.html)

VULNERABILITY
-------------

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 second
transfer.

The problem exists in the logic for a reused handle when it is (expected to
be) changed from a PUT to a POST.

INFO
----

The code actually sending wrong data or doing a use-after-free is not present
in libcurl code but are only presumed scenarios that might become the outcome
of libcurl surprisingly calling the read callback in a situation where it is
not expected to.

This flaw cannot be triggered with the command line tool.

This problem is almost identical to
[CVE-2022-32221](https://curl.se/docs/CVE-2022-32221.html). A difference this
time is that setting `CURLOPT_POST` for the second transfer avoids the
problem, where as only setting `CURLOPT_POSTFIELDS` after the PUT still makes
the second transfer to a PUT and use the callback.

The Common Vulnerabilities and Exposures (CVE) project has assigned the name
CVE-2023-28322 to this issue.

CWE-440: Expected Behavior Violation

Severity: Low

AFFECTED VERSIONS
-----------------

- Affected versions: libcurl 7.7 to and including 8.0.1
- Not affected versions: libcurl < 7.7 and >= 8.1.0
- Introduced-in: https://github.com/curl/curl/commit/546572da0457f3

libcurl is used by many applications, but not always advertised as such!

SOLUTION
------------

This time the logic is improved to avoid having two separate variable fields
holding info about HTTP method and behavior. Now there is only one, which
should make it harder to end up in such a confused middle state.

- Fixed-in: https://github.com/curl/curl/commit/7815647d6582c0a4900be2e1de

RECOMMENDATIONS
--------------

  A - Upgrade curl to version 8.1.0

  B - Apply the patch to your local version

  C - Do not do mix using the read callback and postfields string on a reused
      easy handle

TIMELINE
--------

This issue was reported to the curl project on April 19, 2023. We contacted
distros@openwall on May 9, 2023.

libcurl 8.1.0 was released on May 17 2023, coordinated with the publication of
this advisory.

CREDITS
-------

- Reported-by: Hiroki Kurosawa
- Patched-by: Daniel Stenberg
Comment 3 Thomas Leroy 2023-05-09 14:37:58 UTC
Affected:

- SUSE:SLE-11-SP3:Update
- SUSE:SLE-12-SP4:Update
- SUSE:SLE-12-SP5:Update
- SUSE:SLE-12:Update
- SUSE:SLE-15-SP2:Update
- SUSE:SLE-15-SP4:Update
- SUSE:SLE-15:Update
- openSUSE:Factory
Comment 11 Maintenance Automation 2023-05-17 08:30:04 UTC
SUSE-SU-2023:2226-1: An update that solves 10 vulnerabilities and has one fix can now be installed.

Category: security (important)
Bug References: 1206309, 1207992, 1209209, 1209210, 1209211, 1209212, 1209214, 1211231, 1211232, 1211233, 1211339
CVE References: CVE-2022-43552, CVE-2023-23916, CVE-2023-27533, CVE-2023-27534, CVE-2023-27535, CVE-2023-27536, CVE-2023-27538, CVE-2023-28320, CVE-2023-28321, CVE-2023-28322
Sources used:
SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS 15-SP1 (src): curl-7.60.0-150000.51.1
SUSE Linux Enterprise Server 15 SP1 LTSS 15-SP1 (src): curl-7.60.0-150000.51.1
SUSE Linux Enterprise Server for SAP Applications 15 SP1 (src): curl-7.60.0-150000.51.1
SUSE Enterprise Storage 6 (src): curl-7.60.0-150000.51.1
SUSE CaaS Platform 4.0 (src): curl-7.60.0-150000.51.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 12 Maintenance Automation 2023-05-17 08:30:07 UTC
SUSE-SU-2023:2225-1: An update that solves five vulnerabilities and contains one feature can now be installed.

Category: security (important)
Bug References: 1198608, 1211230, 1211231, 1211232, 1211233
CVE References: CVE-2022-27774, CVE-2023-28319, CVE-2023-28320, CVE-2023-28321, CVE-2023-28322
Jira References: PED-2580
Sources used:
SUSE Linux Enterprise Software Development Kit 12 SP5 (src): curl-8.0.1-11.65.2
SUSE Linux Enterprise High Performance Computing 12 SP5 (src): curl-8.0.1-11.65.2
SUSE Linux Enterprise Server 12 SP5 (src): curl-8.0.1-11.65.2
SUSE Linux Enterprise Server for SAP Applications 12 SP5 (src): curl-8.0.1-11.65.2

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 13 Maintenance Automation 2023-05-17 08:30:09 UTC
SUSE-SU-2023:2224-1: An update that solves four vulnerabilities and contains one feature can now be installed.

Category: security (important)
Bug References: 1211230, 1211231, 1211232, 1211233
CVE References: CVE-2023-28319, CVE-2023-28320, CVE-2023-28321, CVE-2023-28322
Jira References: PED-2580
Sources used:
openSUSE Leap Micro 5.3 (src): curl-8.0.1-150400.5.23.1
openSUSE Leap 15.4 (src): curl-8.0.1-150400.5.23.1
SUSE Linux Enterprise Micro for Rancher 5.3 (src): curl-8.0.1-150400.5.23.1
SUSE Linux Enterprise Micro 5.3 (src): curl-8.0.1-150400.5.23.1
SUSE Linux Enterprise Micro for Rancher 5.4 (src): curl-8.0.1-150400.5.23.1
SUSE Linux Enterprise Micro 5.4 (src): curl-8.0.1-150400.5.23.1
Basesystem Module 15-SP4 (src): curl-8.0.1-150400.5.23.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 15 Maintenance Automation 2023-05-17 12:30:21 UTC
SUSE-SU-2023:2230-1: An update that solves three vulnerabilities and has one fix can now be installed.

Category: security (important)
Bug References: 1211231, 1211232, 1211233, 1211339
CVE References: CVE-2023-28320, CVE-2023-28321, CVE-2023-28322
Sources used:
SUSE Linux Enterprise Server 12 SP2 BCL 12-SP2 (src): curl-7.37.0-37.98.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 16 Maintenance Automation 2023-05-17 12:30:23 UTC
SUSE-SU-2023:2228-1: An update that solves 10 vulnerabilities and has one fix can now be installed.

Category: security (important)
Bug References: 1206309, 1207992, 1209209, 1209210, 1209211, 1209212, 1209214, 1211231, 1211232, 1211233, 1211339
CVE References: CVE-2022-43552, CVE-2023-23916, CVE-2023-27533, CVE-2023-27534, CVE-2023-27535, CVE-2023-27536, CVE-2023-27538, CVE-2023-28320, CVE-2023-28321, CVE-2023-28322
Sources used:
SUSE OpenStack Cloud 9 (src): curl-7.60.0-4.56.1
SUSE OpenStack Cloud Crowbar 9 (src): curl-7.60.0-4.56.1
SUSE Linux Enterprise Server for SAP Applications 12 SP4 (src): curl-7.60.0-4.56.1
SUSE Linux Enterprise Server 12 SP4 ESPOS 12-SP4 (src): curl-7.60.0-4.56.1
SUSE Linux Enterprise Server 12 SP4 LTSS 12-SP4 (src): curl-7.60.0-4.56.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 17 Maintenance Automation 2023-05-17 12:30:27 UTC
SUSE-SU-2023:2227-1: An update that solves three vulnerabilities and has one fix can now be installed.

Category: security (important)
Bug References: 1211231, 1211232, 1211233, 1211339
CVE References: CVE-2023-28320, CVE-2023-28321, CVE-2023-28322
Sources used:
SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src): curl-7.66.0-150200.4.57.1
SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): curl-7.66.0-150200.4.57.1
SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): curl-7.66.0-150200.4.57.1
SUSE Linux Enterprise Real Time 15 SP3 (src): curl-7.66.0-150200.4.57.1
SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src): curl-7.66.0-150200.4.57.1
SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): curl-7.66.0-150200.4.57.1
SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src): curl-7.66.0-150200.4.57.1
SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): curl-7.66.0-150200.4.57.1
SUSE Manager Proxy 4.2 (src): curl-7.66.0-150200.4.57.1
SUSE Manager Retail Branch Server 4.2 (src): curl-7.66.0-150200.4.57.1
SUSE Manager Server 4.2 (src): curl-7.66.0-150200.4.57.1
SUSE Enterprise Storage 7.1 (src): curl-7.66.0-150200.4.57.1
SUSE Enterprise Storage 7 (src): curl-7.66.0-150200.4.57.1
SUSE Linux Enterprise Micro 5.1 (src): curl-7.66.0-150200.4.57.1
SUSE Linux Enterprise Micro 5.2 (src): curl-7.66.0-150200.4.57.1
SUSE Linux Enterprise Micro for Rancher 5.2 (src): curl-7.66.0-150200.4.57.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 18 Maintenance Automation 2023-06-21 20:30:03 UTC
SUSE-SU-2023:2224-2: An update that solves four vulnerabilities and contains one feature can now be installed.

Category: security (important)
Bug References: 1211230, 1211231, 1211232, 1211233
CVE References: CVE-2023-28319, CVE-2023-28320, CVE-2023-28321, CVE-2023-28322
Jira References: PED-2580
Sources used:
openSUSE Leap 15.5 (src): curl-8.0.1-150400.5.23.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 22 Marcus Meissner 2024-04-15 15:07:52 UTC
released