diff options
author | 2002-06-08 05:07:09 +0000 | |
---|---|---|
committer | 2002-06-08 05:07:09 +0000 | |
commit | e6471dca27d35c66333cde3f944354d2220408c5 (patch) | |
tree | d8a932e79043959a03e7ed90f1535741beddd4ed /usr.bin/ssh/ssh-keysign.c | |
parent | explicitely set inet for localhost and lo0 tests, test would fail if (diff) | |
download | wireguard-openbsd-e6471dca27d35c66333cde3f944354d2220408c5.tar.xz wireguard-openbsd-e6471dca27d35c66333cde3f944354d2220408c5.zip |
only accept 20 byte session ids
Diffstat (limited to 'usr.bin/ssh/ssh-keysign.c')
-rw-r--r-- | usr.bin/ssh/ssh-keysign.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-keysign.c b/usr.bin/ssh/ssh-keysign.c index da630708db9..41899ff204b 100644 --- a/usr.bin/ssh/ssh-keysign.c +++ b/usr.bin/ssh/ssh-keysign.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: ssh-keysign.c,v 1.2 2002/05/31 10:30:33 markus Exp $"); +RCSID("$OpenBSD: ssh-keysign.c,v 1.3 2002/06/08 05:07:09 markus Exp $"); #include <openssl/evp.h> @@ -54,8 +54,12 @@ valid_request(struct passwd *pw, char *host, Key **ret, u_char *data, buffer_init(&b); buffer_append(&b, data, datalen); - /* session id */ - buffer_skip_string(&b); + /* session id, currently limited to SHA1 (20 bytes) */ + p = buffer_get_string(&b, &len); + if (len != 20) + fail++; + xfree(p); + if (buffer_get_char(&b) != SSH2_MSG_USERAUTH_REQUEST) fail++; |