From FreeBSD:
A remote attacker may effectively bypass MaxAuthTries settings, which would enable them to brute force passwords. [CVE-2015-5600] XXX: pullup-7
This commit is contained in:
parent
e2c773cb5b
commit
29920b2c0d
13
crypto/external/bsd/openssh/dist/auth2-chall.c
vendored
13
crypto/external/bsd/openssh/dist/auth2-chall.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: auth2-chall.c,v 1.7 2015/04/03 23:58:19 christos Exp $ */
|
||||
/* $NetBSD: auth2-chall.c,v 1.8 2015/07/29 15:04:40 christos Exp $ */
|
||||
/* $OpenBSD: auth2-chall.c,v 1.42 2015/01/19 20:07:45 markus Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
__RCSID("$NetBSD: auth2-chall.c,v 1.7 2015/04/03 23:58:19 christos Exp $");
|
||||
__RCSID("$NetBSD: auth2-chall.c,v 1.8 2015/07/29 15:04:40 christos Exp $");
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
@ -83,6 +83,7 @@ struct KbdintAuthctxt
|
||||
void *ctxt;
|
||||
KbdintDevice *device;
|
||||
u_int nreq;
|
||||
u_int devices_done;
|
||||
};
|
||||
|
||||
#ifdef USE_PAM
|
||||
@ -170,11 +171,15 @@ kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt)
|
||||
if (len == 0)
|
||||
break;
|
||||
for (i = 0; devices[i]; i++) {
|
||||
if (!auth2_method_allowed(authctxt,
|
||||
if ((kbdintctxt->devices_done & (1 << i)) != 0 ||
|
||||
!auth2_method_allowed(authctxt,
|
||||
"keyboard-interactive", devices[i]->name))
|
||||
continue;
|
||||
if (strncmp(kbdintctxt->devices, devices[i]->name, len) == 0)
|
||||
if (strncmp(kbdintctxt->devices, devices[i]->name,
|
||||
len) == 0) {
|
||||
kbdintctxt->device = devices[i];
|
||||
kbdintctxt->devices_done |= 1 << i;
|
||||
}
|
||||
}
|
||||
t = kbdintctxt->devices;
|
||||
kbdintctxt->devices = t[len] ? xstrdup(t+len+1) : NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user