[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)
committerGuilherme Puida Moreira <guilherme@puida.xyz>
Tue, 2 Apr 2024 23:02:10 +0000 (20:02 -0300)
commit9c0871495669cd5c6b06c88f362576a7ed3543a2
tree6a08de74683edd5be22251787f04078f80dc20a0
parentd6aa89e3f15dd207df3c843bc85ecf0e0567b3ae
[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]