Описание
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.
A heap-based buffer overflow flaw was found in the SOCKS5 proxy handshake in the Curl package. If Curl is unable to resolve the address itself, it passes the hostname to the SOCKS5 proxy. However, the maximum length of the hostname that can be passed is 255 bytes. If the hostname is longer, then Curl switches to the local name resolving and passes the resolved address only to the proxy. The local variable that instructs Curl to "let the host resolve the name" could obtain the wrong value during a slow SOCKS5 handshake, resulting in the too-long hostname being copied to the target buffer instead of the resolved address, which was not the intended behavior.
Отчет
This flaw does not affect the versions of curl as shipped with Red Hat Enterprise Linux 6, 7, and 8.
An overflow is only possible in applications that do not set CURLOPT_BUFFERSIZE
, or set it smaller than approximately 65kB. Since the curl tool sets CURLOPT_BUFFERSIZE
to 100kB by default, it is not vulnerable unless rate limiting was set by the user to a size smaller than 65kB.
Knowledgebase article:
https://access.redhat.com/solutions/7045099
Меры по смягчению последствий
To avoid this issue, we recommend you do not use CURLPROXY_SOCKS5_HOSTNAME
proxies with curl. Also do not set a proxy environment variable to socks5h://
Затронутые пакеты
Платформа | Пакет | Состояние | Рекомендация | Релиз |
---|---|---|---|---|
Red Hat Enterprise Linux 6 | curl | Not affected | ||
Red Hat Enterprise Linux 7 | curl | Not affected | ||
Red Hat Enterprise Linux 8 | curl | Not affected | ||
JBoss Core Services for RHEL 8 | jbcs-httpd24-curl | Fixed | RHSA-2023:7625 | 07.12.2023 |
JBoss Core Services on RHEL 7 | jbcs-httpd24-curl | Fixed | RHSA-2023:7625 | 07.12.2023 |
Red Hat Enterprise Linux 9 | curl | Fixed | RHSA-2023:5763 | 17.10.2023 |
Red Hat Enterprise Linux 9 | curl | Fixed | RHSA-2023:6745 | 07.11.2023 |
Red Hat Enterprise Linux 9 | curl | Fixed | RHSA-2023:5763 | 17.10.2023 |
Red Hat Enterprise Linux 9 | curl | Fixed | RHSA-2023:6745 | 07.11.2023 |
Red Hat Enterprise Linux 9.0 Extended Update Support | curl | Fixed | RHSA-2023:5700 | 13.10.2023 |
Показывать по
Дополнительная информация
Статус:
EPSS
8.1 High
CVSS3
Связанные уязвимости
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.
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.
This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy ...
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.
EPSS
8.1 High
CVSS3