diff options
author | Colin Watson <cjwatson@debian.org> | 2010-01-01 23:53:30 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2010-01-01 23:53:30 +0000 |
commit | df03186a4f9e0c2ece398b5c0571cb6263d7a752 (patch) | |
tree | 1aab079441dff9615274769b19f2d734ddf508dd /session.c | |
parent | 6ad6994c288662fca6949f42bf91fec2aff00bca (diff) | |
parent | 99b402ea4c8457b0a3cafff37f5b3410a8dc6476 (diff) |
* New upstream release (closes: #536182). Yes, I know 5.3p1 has been out
for a while, but there's no GSSAPI patch available for it yet.
- Change the default cipher order to prefer the AES CTR modes and the
revised "arcfour256" mode to CBC mode ciphers that are susceptible to
CPNI-957037 "Plaintext Recovery Attack Against SSH".
- Add countermeasures to mitigate CPNI-957037-style attacks against the
SSH protocol's use of CBC-mode ciphers. Upon detection of an invalid
packet length or Message Authentication Code, ssh/sshd will continue
reading up to the maximum supported packet length rather than
immediately terminating the connection. This eliminates most of the
known differences in behaviour that leaked information about the
plaintext of injected data which formed the basis of this attack
(closes: #506115, LP: #379329).
- ForceCommand directive now accepts commandline arguments for the
internal-sftp server (closes: #524423, LP: #362511).
- Add AllowAgentForwarding to available Match keywords list (closes:
#540623).
- Make ssh(1) send the correct channel number for
SSH2_MSG_CHANNEL_SUCCESS and SSH2_MSG_CHANNEL_FAILURE messages to
avoid triggering 'Non-public channel' error messages on sshd(8) in
openssh-5.1.
- Avoid printing 'Non-public channel' warnings in sshd(8), since the
ssh(1) has sent incorrect channel numbers since ~2004 (this reverts a
behaviour introduced in openssh-5.1; closes: #496017).
* Update to GSSAPI patch from
http://www.sxw.org.uk/computing/patches/openssh-5.2p1-gsskex-all-20090726.patch,
including cascading credentials support (LP: #416958).
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: session.c,v 1.241 2008/06/16 13:22:53 dtucker Exp $ */ | 1 | /* $OpenBSD: session.c,v 1.245 2009/01/22 09:46:01 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
4 | * All rights reserved | 4 | * All rights reserved |
@@ -95,6 +95,12 @@ | |||
95 | #include <kafs.h> | 95 | #include <kafs.h> |
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | #define IS_INTERNAL_SFTP(c) \ | ||
99 | (!strncmp(c, INTERNAL_SFTP_NAME, sizeof(INTERNAL_SFTP_NAME) - 1) && \ | ||
100 | (c[sizeof(INTERNAL_SFTP_NAME) - 1] == '\0' || \ | ||
101 | c[sizeof(INTERNAL_SFTP_NAME) - 1] == ' ' || \ | ||
102 | c[sizeof(INTERNAL_SFTP_NAME) - 1] == '\t')) | ||
103 | |||
98 | /* func */ | 104 | /* func */ |
99 | 105 | ||
100 | Session *session_new(void); | 106 | Session *session_new(void); |
@@ -228,7 +234,7 @@ auth_input_request_forwarding(struct passwd * pw) | |||
228 | SSH_CHANNEL_AUTH_SOCKET, sock, sock, -1, | 234 | SSH_CHANNEL_AUTH_SOCKET, sock, sock, -1, |
229 | CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, | 235 | CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, |
230 | 0, "auth socket", 1); | 236 | 0, "auth socket", 1); |
231 | strlcpy(nc->path, auth_sock_name, sizeof(nc->path)); | 237 | nc->path = xstrdup(auth_sock_name); |
232 | return 1; | 238 | return 1; |
233 | 239 | ||
234 | authsock_err: | 240 | authsock_err: |
@@ -781,7 +787,7 @@ do_exec(Session *s, const char *command) | |||
781 | if (options.adm_forced_command) { | 787 | if (options.adm_forced_command) { |
782 | original_command = command; | 788 | original_command = command; |
783 | command = options.adm_forced_command; | 789 | command = options.adm_forced_command; |
784 | if (strcmp(INTERNAL_SFTP_NAME, command) == 0) | 790 | if (IS_INTERNAL_SFTP(command)) |
785 | s->is_subsystem = SUBSYSTEM_INT_SFTP; | 791 | s->is_subsystem = SUBSYSTEM_INT_SFTP; |
786 | else if (s->is_subsystem) | 792 | else if (s->is_subsystem) |
787 | s->is_subsystem = SUBSYSTEM_EXT; | 793 | s->is_subsystem = SUBSYSTEM_EXT; |
@@ -789,7 +795,7 @@ do_exec(Session *s, const char *command) | |||
789 | } else if (forced_command) { | 795 | } else if (forced_command) { |
790 | original_command = command; | 796 | original_command = command; |
791 | command = forced_command; | 797 | command = forced_command; |
792 | if (strcmp(INTERNAL_SFTP_NAME, command) == 0) | 798 | if (IS_INTERNAL_SFTP(command)) |
793 | s->is_subsystem = SUBSYSTEM_INT_SFTP; | 799 | s->is_subsystem = SUBSYSTEM_INT_SFTP; |
794 | else if (s->is_subsystem) | 800 | else if (s->is_subsystem) |
795 | s->is_subsystem = SUBSYSTEM_EXT; | 801 | s->is_subsystem = SUBSYSTEM_EXT; |
@@ -926,7 +932,7 @@ check_quietlogin(Session *s, const char *command) | |||
926 | 932 | ||
927 | /* | 933 | /* |
928 | * Sets the value of the given variable in the environment. If the variable | 934 | * Sets the value of the given variable in the environment. If the variable |
929 | * already exists, its value is overriden. | 935 | * already exists, its value is overridden. |
930 | */ | 936 | */ |
931 | void | 937 | void |
932 | child_set_env(char ***envp, u_int *envsizep, const char *name, | 938 | child_set_env(char ***envp, u_int *envsizep, const char *name, |
@@ -1789,7 +1795,7 @@ do_child(Session *s, const char *command) | |||
1789 | char *p, *args; | 1795 | char *p, *args; |
1790 | 1796 | ||
1791 | setproctitle("%s@internal-sftp-server", s->pw->pw_name); | 1797 | setproctitle("%s@internal-sftp-server", s->pw->pw_name); |
1792 | args = strdup(command ? command : "sftp-server"); | 1798 | args = xstrdup(command ? command : "sftp-server"); |
1793 | for (i = 0, (p = strtok(args, " ")); p; (p = strtok(NULL, " "))) | 1799 | for (i = 0, (p = strtok(args, " ")); p; (p = strtok(NULL, " "))) |
1794 | if (i < ARGV_MAX - 1) | 1800 | if (i < ARGV_MAX - 1) |
1795 | argv[i++] = p; | 1801 | argv[i++] = p; |