diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | bufbn.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -4,6 +4,9 @@ | |||
4 | [bufbn.c] | 4 | [bufbn.c] |
5 | fix unsigned overflow that could lead to reading a short ssh protocol | 5 | fix unsigned overflow that could lead to reading a short ssh protocol |
6 | 1 bignum value; found by Ben Hawkes; ok deraadt@ | 6 | 1 bignum value; found by Ben Hawkes; ok deraadt@ |
7 | - djm@cvs.openbsd.org 2014/02/27 08:25:09 | ||
8 | [bufbn.c] | ||
9 | off by one in range check | ||
7 | 10 | ||
8 | 20140227 | 11 | 20140227 |
9 | - OpenBSD CVS Sync | 12 | - OpenBSD CVS Sync |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bufbn.c,v 1.10 2014/02/27 00:41:49 djm Exp $*/ | 1 | /* $OpenBSD: bufbn.c,v 1.11 2014/02/27 08:25:09 djm Exp $*/ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -108,7 +108,7 @@ buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value) | |||
108 | return (-1); | 108 | return (-1); |
109 | } | 109 | } |
110 | bits = get_u16(buf); | 110 | bits = get_u16(buf); |
111 | if (bits > 65536-7) { | 111 | if (bits > 65535-7) { |
112 | error("buffer_get_bignum_ret: cannot handle BN of size %d", | 112 | error("buffer_get_bignum_ret: cannot handle BN of size %d", |
113 | bits); | 113 | bits); |
114 | return (-1); | 114 | return (-1); |