Skip to content

Commit df18979

Browse files
committed
upstream: DNS0x20[1] can randomise the case of domain names returned by
lookup to force some more uniqueness in queries to reduce the likelihood of spoofing attacks succeeding. Normally this should be hidden from the user by the resolver, but in some cases it can leak through. When it does, it can mess up ssh's CanonicalizePermittedCNAMEs. Fix this by forcing the name we received from the system resolver to lowercase. bz3966, report and fix by Martin D Kealey [1] https://datatracker.ietf.org/doc/html/draft-vixie-dnsext-dns0x20-00 OpenBSD-Commit-ID: e0b300d3b3af289e053d928380af71949f95bfb0
1 parent 5a5e477 commit df18979

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ssh.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: ssh.c,v 1.631 2026/05/31 04:24:39 djm Exp $ */
1+
/* $OpenBSD: ssh.c,v 1.632 2026/05/31 05:55:21 djm Exp $ */
22
/*
33
* Author: Tatu Ylonen <ylo@cs.hut.fi>
44
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -399,6 +399,7 @@ check_follow_cname(int direct, char **namep, const char *cname)
399399
"\"%s\" => \"%s\"", *namep, cname);
400400
free(*namep);
401401
*namep = xstrdup(cname);
402+
lowercase(*namep);
402403
return 1;
403404
}
404405
return 0;

0 commit comments

Comments
 (0)