[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, 9 Mar 2025 10:45:45 +0000 (10:45 +0000)
commitb8c6f427b76331f4272c6ebfbb75f0bff4fd5eb6
tree91966c9d98bef3f7ff5d955839399bec07b734e8
parent50898897cb19dbba7bd2de9679c3b6d03cf46107
[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]