diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-02-25 17:29:38 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-02-26 04:32:08 +1100 |
commit | 6f621603f9cff2a5d6016a404c96cb2f8ac2dec0 (patch) | |
tree | 636d95b7019b04ec8b4371e27f4a6844b93b7dad | |
parent | 6288e3a935494df12519164f52ca5c8c65fc3ca5 (diff) |
upstream commit
don't leak validity of user in "too many authentication
failures" disconnect message; reported by Sebastian Reitenbach
-rw-r--r-- | auth.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth.c,v 1.109 2015/01/20 23:14:00 deraadt Exp $ */ | 1 | /* $OpenBSD: auth.c,v 1.110 2015/02/25 17:29:38 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -331,13 +331,14 @@ auth_log(Authctxt *authctxt, int authenticated, int partial, | |||
331 | void | 331 | void |
332 | auth_maxtries_exceeded(Authctxt *authctxt) | 332 | auth_maxtries_exceeded(Authctxt *authctxt) |
333 | { | 333 | { |
334 | packet_disconnect("Too many authentication failures for " | 334 | error("maximum authentication attempts exceeded for " |
335 | "%s%.100s from %.200s port %d %s", | 335 | "%s%.100s from %.200s port %d %s", |
336 | authctxt->valid ? "" : "invalid user ", | 336 | authctxt->valid ? "" : "invalid user ", |
337 | authctxt->user, | 337 | authctxt->user, |
338 | get_remote_ipaddr(), | 338 | get_remote_ipaddr(), |
339 | get_remote_port(), | 339 | get_remote_port(), |
340 | compat20 ? "ssh2" : "ssh1"); | 340 | compat20 ? "ssh2" : "ssh1"); |
341 | packet_disconnect("Too many authentication failures"); | ||
341 | /* NOTREACHED */ | 342 | /* NOTREACHED */ |
342 | } | 343 | } |
343 | 344 | ||