CURL-CVE-2023-38545

Source
https://curl.se/docs/CVE-2023-38545.html
Import Source
https://curl.se/docs/CURL-CVE-2023-38545.json
JSON Data
https://api.osv.dev/v1/vulns/CURL-CVE-2023-38545
Aliases
Published
2023-10-11T08:00:00Z
Modified
2024-09-11T06:12:27.611580Z
Summary
SOCKS5 heap buffer overflow
Details

This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy handshake.

When curl is asked to pass along the hostname to the SOCKS5 proxy to allow that to resolve the address instead of it getting done by curl itself, the maximum length that hostname can be is 255 bytes.

If the hostname is detected to be longer than 255 bytes, curl switches to local name resolving and instead passes on the resolved address only to the proxy. Due to a bug, the local variable that means "let the host resolve the name" could get the wrong value during a slow SOCKS5 handshake, and contrary to the intention, copy the too long hostname to the target buffer instead of copying just the resolved address there.

References
Credits
    • Jay Satiro - FINDER
    • Jay Satiro - REMEDIATION_DEVELOPER

Affected packages

Git / github.com/curl/curl.git

Affected ranges

Type
SEMVER
Events
Introduced
7.69.0
Fixed
8.4.0
Type
GIT
Repo
https://github.com/curl/curl.git
Events

Affected versions

7.*

7.69.0
7.69.1
7.70.0
7.71.0
7.71.1
7.72.0
7.73.0
7.74.0
7.75.0
7.76.0
7.76.1
7.77.0
7.78.0
7.79.0
7.79.1
7.80.0
7.81.0
7.82.0
7.83.0
7.83.1
7.84.0
7.85.0
7.86.0
7.87.0
7.88.0
7.88.1

8.*

8.0.0
8.0.1
8.1.0
8.1.1
8.1.2
8.2.0
8.2.1
8.3.0