summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-10-07 13:33:15 +0100
committerColin Watson <cjwatson@debian.org>2014-10-07 14:27:30 +0100
commitf0b009aea83e9ff3a50be30f51012099a5143c16 (patch)
tree3825e6f7e3b7ea4481d06ed89aba9a7a95150df5 /auth.c
parent47f0bad4330b16ec3bad870fcf9839c196e42c12 (diff)
parent762c062828f5a8f6ed189ed6e44ad38fd92f8b36 (diff)
Merge 6.7p1.
* New upstream release (http://www.openssh.com/txt/release-6.7): - sshd(8): The default set of ciphers and MACs has been altered to remove unsafe algorithms. In particular, CBC ciphers and arcfour* are disabled by default. The full set of algorithms remains available if configured explicitly via the Ciphers and MACs sshd_config options. - ssh(1), sshd(8): Add support for Unix domain socket forwarding. A remote TCP port may be forwarded to a local Unix domain socket and vice versa or both ends may be a Unix domain socket (closes: #236718). - ssh(1), ssh-keygen(1): Add support for SSHFP DNS records for ED25519 key types. - sftp(1): Allow resumption of interrupted uploads. - ssh(1): When rekeying, skip file/DNS lookups of the hostkey if it is the same as the one sent during initial key exchange. - sshd(8): Allow explicit ::1 and 127.0.0.1 forwarding bind addresses when GatewayPorts=no; allows client to choose address family. - sshd(8): Add a sshd_config PermitUserRC option to control whether ~/.ssh/rc is executed, mirroring the no-user-rc authorized_keys option. - ssh(1): Add a %C escape sequence for LocalCommand and ControlPath that expands to a unique identifer based on a hash of the tuple of (local host, remote user, hostname, port). Helps avoid exceeding miserly pathname limits for Unix domain sockets in multiplexing control paths. - sshd(8): Make the "Too many authentication failures" message include the user, source address, port and protocol in a format similar to the authentication success / failure messages. - Use CLOCK_BOOTTIME in preference to CLOCK_MONOTONIC when it is available. It considers time spent suspended, thereby ensuring timeouts (e.g. for expiring agent keys) fire correctly (closes: #734553). - Use prctl() to prevent sftp-server from accessing /proc/self/{mem,maps}. * Restore TCP wrappers support, removed upstream in 6.7. It is true that dropping this reduces preauth attack surface in sshd. On the other hand, this support seems to be quite widely used, and abruptly dropping it (from the perspective of users who don't read openssh-unix-dev) could easily cause more serious problems in practice. It's not entirely clear what the right long-term answer for Debian is, but it at least probably doesn't involve dropping this feature shortly before a freeze. * Replace patch to disable OpenSSL version check with an updated version of Kurt Roeckx's patch from #732940 to just avoid checking the status field.
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/auth.c b/auth.c
index 0c45f0954..18de51a29 100644
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.c,v 1.103 2013/05/19 02:42:42 djm Exp $ */ 1/* $OpenBSD: auth.c,v 1.106 2014/07/15 15:54:14 millert Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -56,6 +56,7 @@
56#include "groupaccess.h" 56#include "groupaccess.h"
57#include "log.h" 57#include "log.h"
58#include "buffer.h" 58#include "buffer.h"
59#include "misc.h"
59#include "servconf.h" 60#include "servconf.h"
60#include "key.h" 61#include "key.h"
61#include "hostfile.h" 62#include "hostfile.h"
@@ -63,7 +64,6 @@
63#include "auth-options.h" 64#include "auth-options.h"
64#include "canohost.h" 65#include "canohost.h"
65#include "uidswap.h" 66#include "uidswap.h"
66#include "misc.h"
67#include "packet.h" 67#include "packet.h"
68#include "loginrec.h" 68#include "loginrec.h"
69#ifdef GSSAPI 69#ifdef GSSAPI
@@ -326,6 +326,20 @@ auth_log(Authctxt *authctxt, int authenticated, int partial,
326#endif 326#endif
327} 327}
328 328
329
330void
331auth_maxtries_exceeded(Authctxt *authctxt)
332{
333 packet_disconnect("Too many authentication failures for "
334 "%s%.100s from %.200s port %d %s",
335 authctxt->valid ? "" : "invalid user ",
336 authctxt->user,
337 get_remote_ipaddr(),
338 get_remote_port(),
339 compat20 ? "ssh2" : "ssh1");
340 /* NOTREACHED */
341}
342
329/* 343/*
330 * Check whether root logins are disallowed. 344 * Check whether root logins are disallowed.
331 */ 345 */
@@ -656,6 +670,7 @@ getpwnamallow(const char *user)
656int 670int
657auth_key_is_revoked(Key *key) 671auth_key_is_revoked(Key *key)
658{ 672{
673#ifdef WITH_OPENSSL
659 char *key_fp; 674 char *key_fp;
660 675
661 if (options.revoked_keys_file == NULL) 676 if (options.revoked_keys_file == NULL)
@@ -668,6 +683,7 @@ auth_key_is_revoked(Key *key)
668 default: 683 default:
669 goto revoked; 684 goto revoked;
670 } 685 }
686#endif
671 debug3("%s: treating %s as a key list", __func__, 687 debug3("%s: treating %s as a key list", __func__,
672 options.revoked_keys_file); 688 options.revoked_keys_file);
673 switch (key_in_file(key, options.revoked_keys_file, 0)) { 689 switch (key_in_file(key, options.revoked_keys_file, 0)) {
@@ -679,6 +695,7 @@ auth_key_is_revoked(Key *key)
679 error("Revoked keys file is unreadable: refusing public key " 695 error("Revoked keys file is unreadable: refusing public key "
680 "authentication"); 696 "authentication");
681 return 1; 697 return 1;
698#ifdef WITH_OPENSSL
682 case 1: 699 case 1:
683 revoked: 700 revoked:
684 /* Key revoked */ 701 /* Key revoked */
@@ -687,6 +704,7 @@ auth_key_is_revoked(Key *key)
687 "%s key %s ", key_type(key), key_fp); 704 "%s key %s ", key_type(key), key_fp);
688 free(key_fp); 705 free(key_fp);
689 return 1; 706 return 1;
707#endif
690 } 708 }
691 fatal("key_in_file returned junk"); 709 fatal("key_in_file returned junk");
692} 710}