[PATCH] socks: return error if hostname too long for remote resolve
authorJay Satiro <raysatiro@yahoo.com>
Sat, 30 Sep 2023 07:40:02 +0000 (03:40 -0400)
committerSamuel Henrique <samueloph@debian.org>
Sun, 10 Dec 2023 06:07:30 +0000 (06:07 +0000)
commit044ef360201b00d33362f23d695aa704cb49fa8e
treeddcb28076e8f76afd68e23d6d98df19e6a4a6964
parent9db59f7c57b8e0ef511a91e7a6f03cb3fd05f1dc
[PATCH] socks: return error if hostname too long for remote resolve

Prior to this change the state machine attempted to change the remote
resolve to a local resolve if the hostname was longer than 255
characters. Unfortunately that did not work as intended and caused a
security issue.

Name resolvers cannot resolve hostnames longer than 255 characters.

Bug: https://curl.se/docs/CVE-2023-38545.html

Backported by: Samuel Henrique <samueloph@debian.org>

Gbp-Pq: Name CVE-2023-38545.patch
lib/socks.c
tests/data/Makefile.inc
tests/data/test728 [new file with mode: 0644]