1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2026-10-24 03:48:55 +03:00

CVE-2026-59850 channels: Avoid processing DATA packets on closed channels

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Pavol Žáčik <pzacik@redhat.com>
This commit is contained in:
Jakub Jelen
2026-07-01 16:43:08 +02:00
parent ba96c3c213
commit a8a3fa352b

View File

@@ -660,6 +660,13 @@ SSH_PACKET_CALLBACK(channel_rcv_data)
channel->local_channel,
channel->remote_channel);
if (channel->flags & SSH_CHANNEL_FLAG_CLOSED_REMOTE) {
SSH_LOG(SSH_LOG_WARNING, "Received data on (remotely) closed channel");
ssh_set_error(session, SSH_FATAL, "Received data on (remotely) closed channel");
SSH_STRING_FREE(str);
return SSH_PACKET_USED;
}
if (len > channel->local_window) {
SSH_LOG(SSH_LOG_RARE,
"Data packet too big for our window(%" PRIu32 " vs %" PRIu32 ")",