summaryrefslogtreecommitdiff
path: root/ssh-gss.h
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2010-01-01 23:53:30 +0000
committerColin Watson <cjwatson@debian.org>2010-01-01 23:53:30 +0000
commitdf03186a4f9e0c2ece398b5c0571cb6263d7a752 (patch)
tree1aab079441dff9615274769b19f2d734ddf508dd /ssh-gss.h
parent6ad6994c288662fca6949f42bf91fec2aff00bca (diff)
parent99b402ea4c8457b0a3cafff37f5b3410a8dc6476 (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 'ssh-gss.h')
-rw-r--r--ssh-gss.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/ssh-gss.h b/ssh-gss.h
index 4e9e357b5..31d5a0835 100644
--- a/ssh-gss.h
+++ b/ssh-gss.h
@@ -1,6 +1,6 @@
1/* $OpenBSD: ssh-gss.h,v 1.10 2007/06/12 08:20:00 djm Exp $ */ 1/* $OpenBSD: ssh-gss.h,v 1.10 2007/06/12 08:20:00 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. 3 * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -75,6 +75,7 @@ typedef struct {
75 char *filename; 75 char *filename;
76 char *envvar; 76 char *envvar;
77 char *envval; 77 char *envval;
78 struct passwd *owner;
78 void *data; 79 void *data;
79} ssh_gssapi_ccache; 80} ssh_gssapi_ccache;
80 81
@@ -82,8 +83,11 @@ typedef struct {
82 gss_buffer_desc displayname; 83 gss_buffer_desc displayname;
83 gss_buffer_desc exportedname; 84 gss_buffer_desc exportedname;
84 gss_cred_id_t creds; 85 gss_cred_id_t creds;
86 gss_name_t name;
85 struct ssh_gssapi_mech_struct *mech; 87 struct ssh_gssapi_mech_struct *mech;
86 ssh_gssapi_ccache store; 88 ssh_gssapi_ccache store;
89 int used;
90 int updated;
87} ssh_gssapi_client; 91} ssh_gssapi_client;
88 92
89typedef struct ssh_gssapi_mech_struct { 93typedef struct ssh_gssapi_mech_struct {
@@ -94,6 +98,7 @@ typedef struct ssh_gssapi_mech_struct {
94 int (*userok) (ssh_gssapi_client *, char *); 98 int (*userok) (ssh_gssapi_client *, char *);
95 int (*localname) (ssh_gssapi_client *, char **); 99 int (*localname) (ssh_gssapi_client *, char **);
96 void (*storecreds) (ssh_gssapi_client *); 100 void (*storecreds) (ssh_gssapi_client *);
101 int (*updatecreds) (ssh_gssapi_ccache *, ssh_gssapi_client *);
97} ssh_gssapi_mech; 102} ssh_gssapi_mech;
98 103
99typedef struct { 104typedef struct {
@@ -104,7 +109,7 @@ typedef struct {
104 gss_OID oid; /* client */ 109 gss_OID oid; /* client */
105 gss_cred_id_t creds; /* server */ 110 gss_cred_id_t creds; /* server */
106 gss_name_t client; /* server */ 111 gss_name_t client; /* server */
107 gss_cred_id_t client_creds; /* server */ 112 gss_cred_id_t client_creds; /* both */
108} Gssctxt; 113} Gssctxt;
109 114
110extern ssh_gssapi_mech *supported_mechs[]; 115extern ssh_gssapi_mech *supported_mechs[];
@@ -128,16 +133,21 @@ void ssh_gssapi_build_ctx(Gssctxt **);
128void ssh_gssapi_delete_ctx(Gssctxt **); 133void ssh_gssapi_delete_ctx(Gssctxt **);
129OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t); 134OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t);
130void ssh_gssapi_buildmic(Buffer *, const char *, const char *, const char *); 135void ssh_gssapi_buildmic(Buffer *, const char *, const char *, const char *);
131int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *); 136int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *, const char *);
137OM_uint32 ssh_gssapi_client_identity(Gssctxt *, const char *);
138int ssh_gssapi_credentials_updated(Gssctxt *);
132 139
133/* In the server */ 140/* In the server */
134typedef int ssh_gssapi_check_fn(Gssctxt **, gss_OID, const char *); 141typedef int ssh_gssapi_check_fn(Gssctxt **, gss_OID, const char *,
135char *ssh_gssapi_client_mechanisms(const char *host); 142 const char *);
136char *ssh_gssapi_kex_mechs(gss_OID_set, ssh_gssapi_check_fn *, const char *); 143char *ssh_gssapi_client_mechanisms(const char *, const char *);
144char *ssh_gssapi_kex_mechs(gss_OID_set, ssh_gssapi_check_fn *, const char *,
145 const char *);
137gss_OID ssh_gssapi_id_kex(Gssctxt *, char *, int); 146gss_OID ssh_gssapi_id_kex(Gssctxt *, char *, int);
138int ssh_gssapi_server_check_mech(Gssctxt **,gss_OID, const char *); 147int ssh_gssapi_server_check_mech(Gssctxt **,gss_OID, const char *,
148 const char *);
139OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID); 149OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID);
140int ssh_gssapi_userok(char *name); 150int ssh_gssapi_userok(char *name, struct passwd *);
141OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t); 151OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t);
142void ssh_gssapi_do_child(char ***, u_int *); 152void ssh_gssapi_do_child(char ***, u_int *);
143void ssh_gssapi_cleanup_creds(void); 153void ssh_gssapi_cleanup_creds(void);
@@ -145,6 +155,8 @@ void ssh_gssapi_storecreds(void);
145 155
146char *ssh_gssapi_server_mechanisms(void); 156char *ssh_gssapi_server_mechanisms(void);
147int ssh_gssapi_oid_table_ok(); 157int ssh_gssapi_oid_table_ok();
158
159int ssh_gssapi_update_creds(ssh_gssapi_ccache *store);
148#endif /* GSSAPI */ 160#endif /* GSSAPI */
149 161
150#endif /* _SSH_GSS_H */ 162#endif /* _SSH_GSS_H */