CVE-2023-38545
curl: heap based buffer overflow in the SOCKS5 proxy handshake
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD, Azure Linux, CBL-Mariner, Julia, Photon OS. Rated lower by Red Hat (high), AlmaLinux (high), Amazon (high), Oracle (high), Rocky Linux (high), Ubuntu (high).
Description
This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy handshake. When curl is asked to pass along the host name to the SOCKS5 proxy to allow that to resolve the address instead of it getting done by curl itself, the maximum length that host name can be is 255 bytes. If the host name is detected to be longer, curl switches to local name resolving and instead passes on the resolved address only. Due to this 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 host name to the target buffer instead of copying just the resolved address there. The target buffer being a heap based buffer, and the host name coming from the URL that curl has been told to operate with.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| Azure Linux 3.0 | cmake, tensorflow | 0:3.21.4-10.azl3 and 1 more |
| CBL-Mariner 2.0 | cmake, curl | 0:3.21.4-10.cm2 and 1 more |
| julia::Julia Ecosystem Security Advisories | CURL_jll, LibCURL_jll | 8.5.0+0 and 1 more |
| Photon OS 3.0 | curl | 8.1.2-4.ph3 |
| Photon OS 4.0 | curl, curl-devel, curl-libs | 8.1.2-6.ph4 |
| Photon OS 5.0 | curl, curl-devel, curl-libs | 8.1.2-6.ph5 |
| alma 9 | curl, curl-minimal, libcurl and 2 more | 7.76.1-26.el9_3.2 |
| alpine 3.15 | curl | 8.4.0-r0 |
| alpine 3.16 | curl | 8.4.0-r0 |
| alpine 3.17 | curl | 8.4.0-r0 |
| alpine 3.18 | curl | 8.4.0-r0 |
| alpine 3.19 | curl | 8.4.0-r0 |
Show all 93 entries from 45 sources
| Source | Package | Fixed in |
|---|---|---|
| Azure Linux 3.0 | cmake | 0:3.21.4-10.azl3 |
| Azure Linux 3.0 | tensorflow | 0:2.16.1-1.azl3 |
| CBL-Mariner 2.0 | cmake | 0:3.21.4-10.cm2 |
| CBL-Mariner 2.0 | curl | 0:8.3.0-2.cm2 |
| julia::Julia Ecosystem Security Advisories | CURL_jll | 8.5.0+0 |
| julia::Julia Ecosystem Security Advisories | LibCURL_jll | 8.4.0+0 |
| Photon OS 3.0 | curl | 8.1.2-4.ph3 |
| Photon OS 4.0 | curl | 8.1.2-6.ph4 |
| Photon OS 4.0 | curl-devel | 8.1.2-6.ph4 |
| Photon OS 4.0 | curl-libs | 8.1.2-6.ph4 |
| Photon OS 5.0 | curl | 8.1.2-6.ph5 |
| Photon OS 5.0 | curl-devel | 8.1.2-6.ph5 |
| Photon OS 5.0 | curl-libs | 8.1.2-6.ph5 |
| alma 9 | curl | 7.76.1-26.el9_3.2 |
| alma 9 | curl-minimal | 7.76.1-26.el9_3.2 |
| alma 9 | libcurl | 7.76.1-26.el9_3.2 |
| alma 9 | libcurl-devel | 7.76.1-26.el9_3.2 |
| alma 9 | libcurl-minimal | 7.76.1-26.el9_3.2 |
| alpine 3.15 | curl | 8.4.0-r0 |
| alpine 3.16 | curl | 8.4.0-r0 |
| alpine 3.17 | curl | 8.4.0-r0 |
| alpine 3.18 | curl | 8.4.0-r0 |
| alpine 3.19 | curl | 8.4.0-r0 |
| alpine 3.20 | curl | 8.4.0-r0 |
| alpine 3.21 | curl | 8.4.0-r0 |
| alpine 3.22 | curl | 8.4.0-r0 |
| alpine 3.23 | curl | 8.4.0-r0 |
| alpine 3.24 | curl | 8.4.0-r0 |
| alpine edge | curl | 8.4.0-r0 |
| amazon linux 2 | curl | 8.3.0-1.amzn2.0.4 |
| amazon linux 2 | curl-debuginfo | 8.3.0-1.amzn2.0.4 |
| amazon linux 2 | libcurl | 8.3.0-1.amzn2.0.4 |
| amazon linux 2 | libcurl-devel | 8.3.0-1.amzn2.0.4 |
| amazon linux 2023 | curl | 8.3.0-1.amzn2023.0.2 |
| amazon linux 2023 | curl-debuginfo | 8.3.0-1.amzn2023.0.2 |
| amazon linux 2023 | curl-debugsource | 8.3.0-1.amzn2023.0.2 |
| amazon linux 2023 | curl-minimal | 8.3.0-1.amzn2023.0.2 |
| amazon linux 2023 | curl-minimal-debuginfo | 8.3.0-1.amzn2023.0.2 |
| amazon linux 2023 | libcurl | 8.3.0-1.amzn2023.0.2 |
| amazon linux 2023 | libcurl-debuginfo | 8.3.0-1.amzn2023.0.2 |
| amazon linux 2023 | libcurl-devel | 8.3.0-1.amzn2023.0.2 |
| amazon linux 2023 | libcurl-minimal | 8.3.0-1.amzn2023.0.2 |
| amazon linux 2023 | libcurl-minimal-debuginfo | 8.3.0-1.amzn2023.0.2 |
| chainguard | curl | 8.4.0-r0 |
| chainguard | curl-rustls | 8.4.0-r0 |
| conan::GitLab Advisory Database Community | libcurl | 8.4.0 |
| debian 11 | curl | 7.74.0-1.3+deb11u10 |
| debian 12 | curl | 7.88.1-10+deb12u4 |
| debian 13 | curl | 8.3.0-3 |
| debian 14 | curl | 8.3.0-3 |
| echo | curl | 7.88.1-10+deb12u4 |
| echo | curl-7.69.1 | 7.69.1+e1 |
| echo | curl-8.1.1 | 8.1.1+e1 |
| Oracle Linux 9 | curl | 7.76.1-26.el9_3.2 |
| Oracle Linux 9 | curl-minimal | 7.76.1-26.el9_3.2 |
| Oracle Linux 9 | libcurl | 7.76.1-26.el9_3.2 |
| Oracle Linux 9 | libcurl-devel | 7.76.1-26.el9_3.2 |
| Oracle Linux 9 | libcurl-minimal | 7.76.1-26.el9_3.2 |
| rapidfort amazon linux 2023 | curl | 0:8.3.0-1.amzn2023.0.2 |
| rapidfort amazon linux 2023 | curl-minimal | 8.3.0-1.amzn2023.0.2 |
| rapidfort amazon linux 2023 | libcurl | 0:8.3.0-1.amzn2023.0.2 |
| rapidfort amazon linux 2023 | libcurl-devel | 8.3.0-1.amzn2023.0.2 |
| rapidfort amazon linux 2023 | rf-curl | 0:8.3.0-1.amzn2023.0.2 |
| rapidfort Oracle Linux 9 | curl | 0:7.76.1-26.el9_3.2 |
| rapidfort Oracle Linux 9 | curl-minimal | 0:7.76.1-26.el9_3.2 |
| rapidfort Oracle Linux 9 | libcurl | 0:7.76.1-26.el9_3.2 |
| rapidfort Oracle Linux 9 | libcurl-devel | 0:7.76.1-26.el9_3.2 |
| rapidfort Oracle Linux 9 | libcurl-minimal | 0:7.76.1-26.el9_3.2 |
| rapidfort ubuntu 20.04 | curl | 0:7.81.0-1ubuntu1.14 |
| rapidfort ubuntu 20.04 | rf-curl | 0:7.81.0-1ubuntu1.14 |
| rapidfort ubuntu 22.04 | curl | 0:7.81.0-1ubuntu1.14 |
| rapidfort ubuntu 22.04 | rf-curl | 0:7.81.0-1ubuntu1.14 |
| rapidfort ubuntu 24.04 | curl | 0:7.81.0-1ubuntu1.14 |
| rapidfort ubuntu 24.04 | rf-curl | 0:7.81.0-1ubuntu1.14 |
| Red Hat | puppet-agent | no fix listed |
| rocky 9 | curl | 0.0.0 |
| rocky 9 | curl-minimal | 0.0.0 |
| rocky 9 | libcurl | 0.0.0 |
| rocky 9 | libcurl-devel | 0.0.0 |
| rocky 9 | libcurl-minimal | 0.0.0 |
| root.io debian 11 | rootio-curl | 7.74.0-1.3+deb11u10 |
| root.io debian 12 | rootio-curl | 7.88.1-10+deb12u4 |
| root.io debian 13 | rootio-curl | 8.3.0-3 |
| seal debian | curl | 7.88.1-10+deb12u14+sp999 |
| seal debian | seal-curl | 7.88.1-10+deb12u14+sp999 |
| seal Red Hat 8 | curl | 7.61.1-34.el8_10.3+sp999 |
| seal Red Hat 8 | seal-curl | 7.61.1-34.el8_10.3+sp999 |
| ubuntu 22.04 | curl | 7.81.0-1ubuntu1.14 |
| ubuntu 23.04 | curl | 7.88.1-8ubuntu2.3 |
| ubuntu 23.10 | curl | 8.2.1-1ubuntu3.1 |
| ubuntu 24.04 | curl | 8.2.1-1ubuntu3.1 |
| wolfi | curl | 8.4.0-r0 |
| wolfi | curl-rustls | 8.4.0-r0 |
References
- http://seclists.org/fulldisclosure/2024/Jan/34
- http://seclists.org/fulldisclosure/2024/Jan/37
- http://seclists.org/fulldisclosure/2024/Jan/38
- https://access.redhat.com/errata/RHSA-2023:5763
- https://access.redhat.com/errata/RHSA-2023:6745
- https://access.redhat.com/security/cve/CVE-2023-38545
- https://bugzilla.redhat.com/2241933
- https://bugzilla.redhat.com/2241938
All 39 references
- https://bugzilla.redhat.com/show_bug.cgi?id=2241933
- https://bugzilla.redhat.com/show_bug.cgi?id=2241938
- https://cert-portal.siemens.com/productcert/html/ssa-082556.html
- https://cert-portal.siemens.com/productcert/html/ssa-093430.html
- https://cert-portal.siemens.com/productcert/html/ssa-507364.html
- https://cert-portal.siemens.com/productcert/html/ssa-832273.html
- https://cert-portal.siemens.com/productcert/html/ssa-943925.html
- https://creativecommons.org/licenses/by/4.0/
- https://curl.se/docs/CVE-2023-38545.html
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-38545
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-38546
- https://errata.almalinux.org/9/ALSA-2023-6745.html
- https://errata.rockylinux.org/RLSA-2023:5763
- https://forum.vmssoftware.com/viewtopic.php?f=8&t=8868
- https://github.com/UTsweetyfish/CVE-2023-38545
- https://github.com/bcdannyboy/CVE-2023-38545
- https://github.com/dbrugman/CVE-2023-38545-POC
- https://linux.oracle.com/cve/CVE-2023-38545.html
- https://linux.oracle.com/errata/ELSA-2023-6745.html
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OGMXNRNSJ4ETDK6FRNU3J7SABXPWCHSQ/
- https://nvd.nist.gov/vuln/detail/CVE-2023-38545
- https://security.netapp.com/advisory/ntap-20231027-0009/
- https://security.netapp.com/advisory/ntap-20240201-0005/
- https://support.apple.com/kb/HT214036
- https://support.apple.com/kb/HT214057
- https://support.apple.com/kb/HT214058
- https://support.apple.com/kb/HT214063
- https://ubuntu.com/security/notices/USN-6429-1
- https://ubuntu.com/security/notices/USN-6429-3
- https://www.cve.org/CVERecord?id=CVE-2023-38545
- https://www.secpod.com/blog/high-severity-heap-buffer-overflow-vulnerability/