mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 15:54:22 +02:00
upstream commit
Fix crashes in the handling of the sshd config file found with the afl fuzzer. ok deraadt@ djm@
This commit is contained in:
parent
867f49c666
commit
72bba3d179
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* $OpenBSD: servconf.c,v 1.254 2014/10/24 02:01:20 lteo Exp $ */
|
/* $OpenBSD: servconf.c,v 1.255 2014/11/24 03:39:22 jsg Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
* All rights reserved
|
* All rights reserved
|
||||||
@ -1612,6 +1612,9 @@ process_server_config_line(ServerOptions *options, char *line,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case sAuthorizedKeysCommand:
|
case sAuthorizedKeysCommand:
|
||||||
|
if (cp == NULL)
|
||||||
|
fatal("%.200s line %d: Missing argument.", filename,
|
||||||
|
linenum);
|
||||||
len = strspn(cp, WHITESPACE);
|
len = strspn(cp, WHITESPACE);
|
||||||
if (*activep && options->authorized_keys_command == NULL) {
|
if (*activep && options->authorized_keys_command == NULL) {
|
||||||
if (cp[len] != '/' && strcasecmp(cp + len, "none") != 0)
|
if (cp[len] != '/' && strcasecmp(cp + len, "none") != 0)
|
||||||
@ -1626,6 +1629,9 @@ process_server_config_line(ServerOptions *options, char *line,
|
|||||||
charptr = &options->authorized_keys_command_user;
|
charptr = &options->authorized_keys_command_user;
|
||||||
|
|
||||||
arg = strdelim(&cp);
|
arg = strdelim(&cp);
|
||||||
|
if (!arg || *arg == '\0')
|
||||||
|
fatal("%s line %d: missing AuthorizedKeysCommandUser "
|
||||||
|
"argument.", filename, linenum);
|
||||||
if (*activep && *charptr == NULL)
|
if (*activep && *charptr == NULL)
|
||||||
*charptr = xstrdup(arg);
|
*charptr = xstrdup(arg);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user