| Summary: | UpdateHostKeys does not check keys in secondary known_hosts files | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Jaap Eldering <jaap> | ||||||
| Component: | ssh | Assignee: | Damien Miller <djm> | ||||||
| Status: | CLOSED FIXED | ||||||||
| Severity: | minor | CC: | djm, dtucker | ||||||
| Priority: | P5 | ||||||||
| Version: | 7.4p1 | ||||||||
| Hardware: | amd64 | ||||||||
| OS: | Linux | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 2894, 3079 | ||||||||
| Attachments: |
|
||||||||
|
Description
Jaap Eldering
2017-07-06 06:34:06 AEST
Created attachment 3008 [details]
patch
I think the attached patch should fix the problem.
I tested it on Debian Stretch against version 7.4p1-10 (with Debian patchlevel) and it worked as expected.
Unfortunately that patch is not sufficient: update_known_hosts() still won't ever update keys in subsequent user_hostfiles I think update_known_hosts() will need to consider all hostfiles, but that will take a refactor of hostfile.c:hostfile_replace_entries() too. I forgot about that use case. If it would be considered for inclusion, I'd be happy to try and write a patch that covers that case too. For my understanding: any occurence of the given host,key-type pair in any of the known_hosts files would have to be replaced by the newly learned key, right? Created attachment 3349 [details]
Update additional UserKnownHostsFiles
Fix committed, will be in openssh-8.2 Thanks a lot! close bugs that were resolved in OpenSSH 8.5 release cycle |