mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
CVE-2018-10933: Check channel state when OPEN_CONFIRMATION arrives
When a SSH2_MSG_OPEN_CONFIRMATION arrives, the channel state is checked to be in SSH_CHANNEL_STATE_OPENING. Fixes T101 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
committed by
Andreas Schneider
parent
7985acb768
commit
3837a0547f
@@ -170,6 +170,15 @@ SSH_PACKET_CALLBACK(ssh_packet_channel_open_conf){
|
|||||||
"Received a CHANNEL_OPEN_CONFIRMATION for channel %d:%d",
|
"Received a CHANNEL_OPEN_CONFIRMATION for channel %d:%d",
|
||||||
channel->local_channel,
|
channel->local_channel,
|
||||||
channel->remote_channel);
|
channel->remote_channel);
|
||||||
|
|
||||||
|
if (channel->state != SSH_CHANNEL_STATE_OPENING) {
|
||||||
|
SSH_LOG(SSH_LOG_RARE,
|
||||||
|
"SSH2_MSG_CHANNEL_OPEN_CONFIRMATION received in incorrect "
|
||||||
|
"channel state %d",
|
||||||
|
channel->state);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
SSH_LOG(SSH_LOG_PROTOCOL,
|
SSH_LOG(SSH_LOG_PROTOCOL,
|
||||||
"Remote window : %lu, maxpacket : %lu",
|
"Remote window : %lu, maxpacket : %lu",
|
||||||
(long unsigned int) channel->remote_window,
|
(long unsigned int) channel->remote_window,
|
||||||
|
|||||||
Reference in New Issue
Block a user