check IP options from IPv4-mapped IPv6 addrs too

Anthropic ANT-2026-MUH7FLBQ
This commit is contained in:
Damien Miller committed 2026-10-30 19:02:51 +11:00
1 parent 74551008cc
commit 976332e15e
1 file changed
+6
+6
View File
@@ -707,6 +707,12 @@ check_ip_options(struct ssh *ssh)
if (getpeername(sock_in, (struct sockaddr *)&from,
&fromlen) == -1)
return;
/*
* IPv4 clients of a dual-stack socket (e.g. inherited via sshd -i)
* appear as IPv4-mapped IPv6 addresses; they are still IPv4
* connections and can carry IPv4 options, so check them too.
*/
ipv64_normalise_mapped(&from, &fromlen);
if (from.ss_family != AF_INET)
return;
/* XXX IPv6 options? */