| Summary: | Kerberos authentication timing can leak information about account validity | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Darren Tucker <dtucker> | ||||||||
| Component: | Kerberos support | Assignee: | OpenSSH Bugzilla mailing list <openssh-bugs> | ||||||||
| Status: | CLOSED FIXED | ||||||||||
| Severity: | normal | ||||||||||
| Priority: | P2 | ||||||||||
| Version: | -current | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| URL: | http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=110371328918329&w=2 | ||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 1155 | ||||||||||
| Attachments: |
|
||||||||||
Created attachment 778 [details]
Patch for Kerberos timing difference for Valid and Invalid user
For PAM-Passwd Authentication with KerberosAuthentication being set to yes,
there exists a time difference for valid user and invalid user. The attached
patch fixes that. I am asked to move the authctxt->valid check to out block in
auth-krb5.c in the mailing lists but I think it is not necessary.
Created attachment 790 [details]
check authctxt->valid on return too
I think it's safer to check authctxt->valid anyway in case, eg in case the user
is listed in DenyUsers.
I can't see any problem with dtucker's second patch. Created attachment 1029 [details]
pass real username through to kerberos
patch #790 applied, thanks to all.
djm also pointed out that we should probably pass the real name through to kerberos too, like so (untested).
For the record, the main part of this bug was fixed and is in 4.3x. The only remaining part is patch #1029 which I'm not in a position to judge the merit of. Maybe we should close this bug? I asked Simon and David Leonard about patch #1029 and they're undecided on it. Since the main part of this bug is fixed I'm closing this bug. If it becomes obvious what to do with the NOUSER thing then we can address it separately. With the release of 4.4, we believe that this bug is now closed. For information about the release please see http://www.openssh.com/txt/release-4.4 . |
There is apparently a difference in behaviour in the Kerberos code for existing vs nonexistent users. See the thread in the URL. To summarise the thread: Senthil Kumar said: > I tested [with the patch in bug #971 - dt] OpenSSH-3.9p1 with the following > options in sshd configuration > > ChallengeResponseAuthentication `no` > KerberosAuthentication `yes` > passwordauthentication `yes` > > but it shows difference in time for the appearance of password prompts for > both valid and invalid users. The code shows PAM-password Authentication is > not attempted when KerberosAuthentication is enabled. So by disabling > kerberosAuthentication there is no difference in time for the appearance of > password prompts for both valid and invalid users (ie.both cases have > considerable amount of delay). Later testing showed that the early return in auth-krb5.c when !authctxt->valid is the cause of the difference.