summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-12-01 12:02:14 +1100
committerDamien Miller <djm@mindrot.org>2010-12-01 12:02:14 +1100
commitd0fdd6818c1633656fd47ee1de9438130eb9eb03 (patch)
tree4f1f09bdfaa8f2c3c3574e347b76b2982a3771ee
parent6a740e7b92c8dba96e81ad3979849e7abcd26829 (diff)
- djm@cvs.openbsd.org 2010/11/23 23:57:24
[clientloop.c] avoid NULL deref on receiving a channel request on an unknown or invalid channel; report bz#1842 from jchadima AT redhat.com; ok dtucker@
-rw-r--r--ChangeLog4
-rw-r--r--clientloop.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index de1fb753d..39d88701a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,10 @@
16 [auth.c] 16 [auth.c]
17 use strict_modes already passed as function argument over referencing 17 use strict_modes already passed as function argument over referencing
18 global options.strict_modes 18 global options.strict_modes
19 - djm@cvs.openbsd.org 2010/11/23 23:57:24
20 [clientloop.c]
21 avoid NULL deref on receiving a channel request on an unknown or invalid
22 channel; report bz#1842 from jchadima AT redhat.com; ok dtucker@
19 23
2020101124 2420101124
21 - (dtucker) [platform.c session.c] Move the getluid call out of session.c and 25 - (dtucker) [platform.c session.c] Move the getluid call out of session.c and
diff --git a/clientloop.c b/clientloop.c
index 076386cc2..91eea8562 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.225 2010/11/21 01:01:13 djm Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.226 2010/11/23 23:57:24 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
@@ -1933,7 +1933,7 @@ client_input_channel_req(int type, u_int32_t seq, void *ctxt)
1933 } 1933 }
1934 packet_check_eom(); 1934 packet_check_eom();
1935 } 1935 }
1936 if (reply) { 1936 if (reply && c != NULL) {
1937 packet_start(success ? 1937 packet_start(success ?
1938 SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE); 1938 SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE);
1939 packet_put_int(c->remote_id); 1939 packet_put_int(c->remote_id);