| Summary: | Host key verification incorrectly handles IPv6 addresses | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Tomas Szaniszlo <tomaxuser> | ||||||
| Component: | ssh | Assignee: | Assigned to nobody <unassigned-bugs> | ||||||
| Status: | CLOSED FIXED | ||||||||
| Severity: | minor | CC: | djm | ||||||
| Priority: | P5 | Keywords: | needs-release-note | ||||||
| Version: | 6.1p1 | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 2266 | ||||||||
| Attachments: |
|
||||||||
|
Description
Tomas Szaniszlo
2013-02-23 21:59:39 AEDT
Created attachment 2226 [details]
canonicalise hostnames that are actually addresses
Host names passed on the commandline are treated as names first and addresses a distant second, which is why this doesn't behave the way you might expect. The host key lookup is incredibly fiddly, but generally prefers that you confirm a key that you maybe have seen before over accepting it. Furthermore, localhost is a special case again so it isn't the best address to test with.
That being said, the attached patch will attempt to canonicalise IP addresses that are passed on the commandline. I'm not entirely sure that we want this, but we are probably going to do some other sort of canonicalisation sooner or later anyway so it might be worthwhile then - I don't intend on committing it as-is.
Sorry for the later response. Regarding those localhost addresses, it was only an unfortunate obfuscation; I tested it with real 2001:: addresses. Regarding the patch, I wanted to try it out but after inspection of sources for BSD tarball and Linux nightly snapshot, I couldn't find out to which sources should I apply that patch. Maybe a question - could there be any disadvantages of doing this? Created attachment 2453 [details]
Canonicalise addresses when CanonicaliseHostnames enabled
This puts the address canonicalisation inside the recently-added hostname canonicalisation code.
this was fixed in openssh-6.8 Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1 |