openssh-portable/openbsd-compat
Darren Tucker 9286875a73 Determine appropriate salt for invalid users.
When sshd is processing a non-PAM login for a non-existent user it uses
the string from the fakepw structure as the salt for crypt(3)ing the
password supplied by the client.  That string has a Blowfish prefix, so on
systems that don't understand that crypt will fail fast due to an invalid
salt, and even on those that do it may have significantly different timing
from the hash methods used for real accounts (eg sha512).  This allows
user enumeration by, eg, sending large password strings.  This was noted
by EddieEzra.Harari at verint.com (CVE-2016-6210).

To mitigate, use the same hash algorithm that root uses for hashing
passwords for users that do not exist on the system.  ok djm@
2016-07-15 13:45:42 +10:00
..
regress Remove now-defunct .cvsignore files. ok djm 2016-06-14 13:51:01 +10:00
Makefile.in Move err.h replacements into compat lib. 2016-07-13 14:42:35 +10:00
arc4random.c support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
base64.c - otto@cvs.openbsd.org 2006/10/21 09:55:03 2007-10-26 16:17:24 +10:00
base64.h - (bal) openbsd-compat/ clean up. Considate headers, add in $Id$ on our 2003-08-29 16:59:52 +00:00
basename.c - (dtucker) [openbsd-compat/basename.c] Include errno.h. 2006-08-24 19:41:03 +10:00
bcrypt_pbkdf.c upstream commit 2015-05-10 11:57:31 +10:00
bindresvport.c initialise salen in binresvport_sa 2016-05-10 09:51:06 +10:00
blf.h - [configure.ac openbsd-compat/Makefile.in openbsd-compat/bcrypt_pbkdf.c] 2013-12-07 11:51:51 +11:00
blowfish.c Wrap blf.h include in ifdef. From FreeBSD. 2015-04-07 10:47:15 +10:00
bsd-asprintf.c Rollback addition of va_start. 2016-02-17 13:37:09 +11:00
bsd-closefrom.c - (dtucker) [openbsd-compat/bsd-closefrom.c] Comment out rcsid. 2006-08-18 19:49:58 +10:00
bsd-cray.c - (dtucker) [openbsd-compat/bsd-cray.c] Remove debug from signal handler. 2007-08-15 19:17:43 +10:00
bsd-cray.h - (dtucker) [auth.c loginrec.h openbsd-compat/{bsd-cray,port-aix}.{c,h}] 2005-02-02 17:10:11 +11:00
bsd-cygwin_util.c Replace strcpy with strlcpy. 2015-06-02 20:15:26 +10:00
bsd-cygwin_util.h - (djm) [configure.ac openbsd-compat/bsd-cygwin_util.c] 2014-05-27 14:34:42 +10:00
bsd-err.c Move err.h replacements into compat lib. 2016-07-13 14:42:35 +10:00
bsd-getpeereid.c - (dtucker) [configure.ac openbsd-compat/bsd-getpeereid.c] Bug #1287: Use 2007-03-21 21:39:57 +11:00
bsd-misc.c Add compat code for missing wcwidth. 2016-07-14 10:59:09 +10:00
bsd-misc.h Move err.h replacements into compat lib. 2016-07-13 14:42:35 +10:00
bsd-nextstep.c - deraadt@cvs.openbsd.org 2006/03/19 18:51:18 2006-03-26 00:03:21 +11:00
bsd-nextstep.h - (bal) openbsd-compat/ clean up. Considate headers, add in $Id$ on our 2003-08-29 16:59:52 +00:00
bsd-openpty.c - (dtucker) [openbsd-compat/bsd-openpty.c] Include for ioctl(2). 2006-08-24 19:52:30 +10:00
bsd-poll.c - (dtucker) [openbsd-compat/bsd-poll.c] Don't bother checking for non-NULL 2014-02-06 10:44:13 +11:00
bsd-poll.h expose POLLHUP and POLLNVAL for netcat.c 2015-08-21 15:45:02 +10:00
bsd-setres_id.c - (djm) [openbsd-compat/bsd-setres_id.c] Missing header; from Corinna 2013-12-08 08:23:08 +11:00
bsd-setres_id.h - (dtucker) [uidswap.c openbsd-compat/Makefile.in 2012-11-05 17:04:37 +11:00
bsd-snprintf.c - (djm) [openbsd-compat/bsd-snprintf.c] Fix compilation failure (prototype/ 2014-08-22 17:48:27 +10:00
bsd-statvfs.c - (dtucker) [configure.ac openbsd-compat/bsd-statvfs.c 2014-01-17 18:10:58 +11:00
bsd-statvfs.h - (dtucker) [openbsd-compat/bsd-statvfs.h] Only start including headers if we 2014-01-17 18:48:22 +11:00
bsd-waitpid.c - deraadt@cvs.openbsd.org 2006/03/19 18:51:18 2006-03-26 00:03:21 +11:00
bsd-waitpid.h - (bal) openbsd-compat/ clean up. Considate headers, add in $Id$ on our 2003-08-29 16:59:52 +00:00
chacha_private.h - (djm) [openbsd-compat/arc4random.c openbsd-compat/chacha_private.h] Pull 2013-10-09 10:42:32 +11:00
charclass.h - djm@cvs.openbsd.org 2010/09/25 09:30:16 2010-10-07 21:39:17 +11:00
daemon.c - (dtucker) [auth-passwd.c auth1.c auth2-kbdint.c auth2-none.c auth2-passwd.c 2009-03-08 11:40:27 +11:00
dirname.c - (dtucker) [openbsd-compat/daemon.c] Update from OpenBSD 1.10 -> 1.13. 2005-11-10 17:33:00 +11:00
explicit_bzero.c - (djm) [openbsd-compat/explicit_bzero.c] implement explicit_bzero() 2014-08-27 06:32:01 +10:00
fake-rfc2553.c - (djm) [openbsd-compat/fake-rfc2553.c openbsd-compat/fake-rfc2553.h] 2008-07-14 21:37:36 +10:00
fake-rfc2553.h Add AI_NUMERICSERV to fake-rfc2553. 2015-02-24 13:43:57 +11:00
fmt_scaled.c - (djm) [configure.ac mux.c sftp.c openbsd-compat/Makefile.in] 2008-05-20 08:57:06 +10:00
getcwd.c - (djm) [openbsd-compat/getcwd.c] Remove OpenBSD rcsid marker since we no 2011-09-23 10:40:50 +10:00
getgrouplist.c - (djm) [openbsd-compat/getgrouplist.c] Remove OpenBSD rcsid marker: the 2011-09-23 10:44:03 +10:00
getopt.h - (dtucker) [openbsd-compat/getopt.h] Remove unneeded bits. 2013-05-17 16:03:48 +10:00
getopt_long.c - (dtucker) [openbsd-compat/getopt.h openbsd-compat/getopt_long.c 2013-05-10 18:08:49 +10:00
getrrsetbyname-ldns.c avoid uninitialised free of ldns_res 2014-12-30 08:16:11 +11:00
getrrsetbyname.c - (dtucker) [INSTALL LICENCE configure.ac openbsd-compat/Makefile.in 2011-11-04 11:25:24 +11:00
getrrsetbyname.h - jakob@cvs.openbsd.org 2007/10/11 18:36:41 2007-10-26 16:26:46 +10:00
glob.c Prevent name collisions with system glob (bz#2463) 2015-10-29 10:48:23 +11:00
glob.h Prevent name collisions with system glob (bz#2463) 2015-10-29 10:48:23 +11:00
inet_aton.c whitespace at EOL 2016-05-31 16:45:28 +10:00
inet_ntoa.c - (dtucker) [openbsd-compat/inet_nto.c] Update from OpenBSD 1.4 -> 1.6. 2005-11-10 17:23:54 +11:00
inet_ntop.c - otto@cvs.openbsd.org 2008/12/09 19:38:38 2011-09-23 11:16:09 +10:00
kludge-fd_set.c - (djm) [openbsd-compat/Makefile.in openbsd-compat/kludge-fd_set.c] 2014-10-01 09:43:07 +10:00
md5.c support --without-openssl at configure time 2015-01-14 21:48:18 +11:00
md5.h support --without-openssl at configure time 2015-01-14 21:48:18 +11:00
mktemp.c - (dtucker) [openbsd-compat/mktemp.c] Fix compiler warning. ok djm 2011-10-01 18:46:12 +10:00
openbsd-compat.h Add compat code for missing wcwidth. 2016-07-14 10:59:09 +10:00
openssl-compat.c support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
openssl-compat.h support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
port-aix.c - (dtucker) [M auth-chall.c auth-krb5.c auth-pam.c cipher-aes.c cipher-ctr.c 2013-06-02 08:07:31 +10:00
port-aix.h - (dtucker) [auth-krb5.c platform.{c,h} openbsd-compat/port-aix.{c,h}] 2009-12-21 10:49:21 +11:00
port-irix.c - (dtucker) [openbsd-compat/port-irix.c] Add errno.h, found by Iain Morgan. 2006-09-02 12:38:56 +10:00
port-irix.h - (bal) openbsd-compat/ clean up. Considate headers, add in $Id$ on our 2003-08-29 16:59:52 +00:00
port-linux.c downgrade OOM adjustment logging: verbose -> debug 2015-07-30 12:32:42 +10:00
port-linux.h - (djm) [configure.ac Makefile.in ssh.c openbsd-compat/port-linux.c 2011-01-25 12:16:15 +11:00
port-solaris.c Make Solaris privs code build on older systems. 2016-02-19 09:05:39 +11:00
port-solaris.h Include priv.h for priv_set_t. 2016-03-11 14:47:41 +11:00
port-tun.c kludge around tun API mismatch betterer 2015-01-15 03:08:29 +11:00
port-tun.h kludge around tun API mismatch betterer 2015-01-15 03:08:29 +11:00
port-uw.c - (tim) [openbsd-compat/port-uw.c] Include misc.h for fwd_opts, used 2014-07-18 20:00:11 -07:00
port-uw.h 20070326 2007-03-26 09:35:28 -07:00
pwcache.c - (dtucker) [openbsd-compat/pwcache.c] Shrink ifdef area to prevent unused 2010-01-16 13:53:52 +11:00
readpassphrase.c Move definition of _NSIG. 2015-02-25 13:40:45 +11:00
readpassphrase.h - (dtucker) [openbsd-compat/readpassphrase.h] Update from OpenBSD 1.3 -> 1.5. 2005-11-10 16:58:47 +11:00
reallocarray.c Wrap stdint.h includes in ifdefs. 2015-02-23 03:07:24 +11:00
realpath.c fix compilation on systems without SYMLOOP_MAX 2015-10-15 15:48:28 -07:00
rmd160.c Wrap endian.h include inside ifdef (bz#2370). 2015-04-17 10:40:23 +10:00
rmd160.h support --without-openssl at configure time 2015-01-14 21:48:18 +11:00
rresvport.c - (djm) [openbsd-compat/rresvport.c] Add unistd.h for missing close() 2008-07-14 12:03:27 +10:00
setenv.c - (djm) [openbsd-compat/setenv.c] Forklift upgrade, including inclusion 2011-09-23 11:26:34 +10:00
setproctitle.c - (djm) [openbsd-compat/setproctitle.c] Don't fail to compile if a 2014-01-22 16:30:15 +11:00
sha1.c support --without-openssl at configure time 2015-01-14 21:48:18 +11:00
sha1.h support --without-openssl at configure time 2015-01-14 21:48:18 +11:00
sha2.c support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
sha2.h support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
sigact.c - (djm) [openbsd-compat/sigact.c] Avoid NULL derefs in ancient sigaction 2008-06-15 10:55:34 +10:00
sigact.h - (dtucker) [openbsd-compat/sigact.h] Update from OpenBSD 1.2 -> 1.3. 2005-11-10 19:43:48 +11:00
strlcat.c - (dtucker) [openbsd-compat/{LOTS}] Move the "OPENBSD ORIGINAL" markers to 2005-11-10 16:18:56 +11:00
strlcpy.c - millert@cvs.openbsd.org 2006/05/05 15:27:38 2011-09-23 10:38:11 +10:00
strmode.c - (dtucker) [openbsd-compat/strmode.c] Update from OpenBSD 1.5 -> 1.7. 2005-11-10 16:38:54 +11:00
strnlen.c - (dtucker) [configure.ac openbsd-compat/Makefile.in 2011-09-29 23:17:18 +10:00
strptime.c - (dtucker) [configure.ac openbsd-compat/Makefile.in 2010-08-16 13:15:23 +10:00
strsep.c - (dtucker) [openbsd-compat/strsep.c] Update from OpenBSD 1.5 -> 1.6. 2005-11-10 17:28:35 +11:00
strtoll.c - (dtucker) [openbsd-compat/{realpath.c,stroll.c,rresvport.c}] $OpenBSD tag. 2005-11-12 14:28:05 +11:00
strtonum.c - (dtucker) [openbsd-compat/strtonum.c] Include stdlib.h for strtoll, 2006-08-05 16:27:20 +10:00
strtoul.c - (dtucker) [openbsd-compat/strtoul.c] Update from OpenBSD 1.5 -> 1.7. 2005-11-10 16:48:10 +11:00
strtoull.c - (dtucker) [configure.ac openbsd-compat/Makefile.in openbsd-compat/strtoull.c 2013-02-15 12:13:01 +11:00
sys-queue.h - (djm) [openbsd-compat/sys-queue.h] Sync with OpenBSD to get 2012-12-03 09:37:56 +11:00
sys-tree.h - (dtucker) [configure.ac openbsd-compat/sys-tree.h] Test if compiler allows 2013-02-08 11:50:09 +11:00
timingsafe_bcmp.c - matthew@cvs.openbsd.org 2010/09/24 13:33:00 2010-10-07 21:25:27 +11:00
vis.c Update vis.h and vis.c from OpenBSD. 2016-06-03 16:03:44 +10:00
vis.h Update vis.h and vis.c from OpenBSD. 2016-06-03 16:03:44 +10:00
xcrypt.c Determine appropriate salt for invalid users. 2016-07-15 13:45:42 +10:00
xmmap.c - (djm) [regress/conch-ciphers.sh regress/putty-ciphers.sh] 2009-02-16 15:21:39 +11:00