Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Invalid ssh2 packet type: 224
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mansonquasch
n00b
n00b


Joined: 15 Jan 2007
Posts: 47

PostPosted: Sat Apr 19, 2014 11:47 am    Post subject: Invalid ssh2 packet type: 224 Reply with quote

Hi,

since a few weeks I get this error when trying to rsync from my home server to the laptop:

Code:
Received disconnect from 192.168.178.29: 2: Invalid ssh2 packet type: 224
rsync: [sender] write error: Broken pipe (32)
rsync error: unexplained error (code 255) at io.c(837) [sender=3.1.0]


Sometimes it starts working again if I reload the sshd server on the laptop. The reverse way (laptopt > server) works like a charme. sshd versions are the same. Useflags are the same. The server is an arm machine, though. Googling didn't result much, only on thread with a supposed patch from 2008.

Any idea?

Thanks,

m.
Back to top
View user's profile Send private message
mansonquasch
n00b
n00b


Joined: 15 Jan 2007
Posts: 47

PostPosted: Sat Apr 19, 2014 11:52 am    Post subject: Reply with quote

Well, I tried it again the reverse way: invoking the same rsync command from the laptop to shovel the data from the server to the laptop:

Code:
Hm, kex protocol error: type 39 seq 85
dispatch_protocol_error: type 78 seq 86
Disconnecting: Invalid ssh2 packet type: 201
rsync: connection unexpectedly closed (1503468 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (290007 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.0]


The directory I copy to on the laptop is a bind mount of another directory on a different hard disk. Maybe this is the problem?
Back to top
View user's profile Send private message
mansonquasch
n00b
n00b


Joined: 15 Jan 2007
Posts: 47

PostPosted: Sat Apr 19, 2014 11:55 am    Post subject: Reply with quote

Ok, it is not the bind mount, because the error also occurs when I rsync directly to the source directory of the bind mount.

However, the error is completely random:

Quote:
XXXX@localhost ~ $ rsync -av 192.168.178.20:/mnt/sda/Music/ /media/sdb/Musik/
receiving incremental file list
Metal/Sevendust/Next/
Metal/Sevendust/Next/06 - Failure.mp3
Metal/Sevendust/Next/07 - See and Believe.mp3
buffer_get_string_ret: bad string length 364681956
buffer_get_string: buffer error
rsync: connection unexpectedly closed (9572564 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (290019 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.0]

XXXX@localhost ~ $ rsync -av 192.168.178.20:/mnt/sda/Music/ /media/sdb/Musik/
receiving incremental file list
Metal/Sevendust/Next/
Metal/Sevendust/Next/07 - See and Believe.mp3
dispatch_protocol_error: type 133 seq 180
Hm, kex protocol error: type 36 seq 181
Disconnecting: Invalid ssh2 packet type: 226
rsync: connection unexpectedly closed (4763860 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (290003 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.0]

XXXX@localhost ~ $ rsync -av 192.168.178.20:/mnt/sda/Music/ /media/sdb/Musik/
receiving incremental file list
Metal/Sevendust/Next/
Metal/Sevendust/Next/07 - See and Believe.mp3
dispatch_protocol_error: type 83 seq 80
dispatch_protocol_error: type 141 seq 81
dispatch_protocol_error: type 129 seq 82
Hm, kex protocol error: type 29 seq 83
dispatch_protocol_error: type 175 seq 84
Disconnecting: Invalid ssh2 packet type: 204
rsync: connection unexpectedly closed (1478986 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (290007 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.0]

XXXX@localhost ~ $ rsync -av 192.168.178.20:/mnt/sda/Music/ /media/sdb/Musik/
receiving incremental file list
Metal/Sevendust/Next/
Metal/Sevendust/Next/07 - See and Believe.mp3
dispatch_protocol_error: type 152 seq 148
dispatch_protocol_error: type 79 seq 149
dispatch_protocol_error: type 136 seq 150
dispatch_protocol_error: type 143 seq 151
Disconnecting: Invalid ssh2 packet type: 240
rsync: connection unexpectedly closed (3682504 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (290003 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.0]

XXXX@localhost ~ $ rsync -av 192.168.178.20:/mnt/sda/Music/ /media/sdb/Musik/
receiving incremental file list
Metal/Sevendust/Next/
Metal/Sevendust/Next/07 - See and Believe.mp3
dispatch_protocol_error: type 72 seq 118
Hm, kex protocol error: type 33 seq 119
dispatch_protocol_error: type 89 seq 120
Disconnecting: Invalid ssh2 packet type: 250
rsync: connection unexpectedly closed (2535656 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (289999 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.0]

XXXX@localhost ~ $ rsync -av 192.168.178.20:/mnt/sda/Music/ /media/sdb/Musik/
receiving incremental file list
Metal/Sevendust/Next/
Metal/Sevendust/Next/07 - See and Believe.mp3
dispatch_protocol_error: type 140 seq 114
Disconnecting: Corrupted padlen 3 on input.
rsync: connection unexpectedly closed (2568424 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync: connection unexpectedly closed (289999 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.0]


Quite frustrating...
Back to top
View user's profile Send private message
mansonquasch
n00b
n00b


Joined: 15 Jan 2007
Posts: 47

PostPosted: Tue Apr 22, 2014 2:39 pm    Post subject: Reply with quote

Just to let you know what I did:

Used this patch:

Code:
--- packet.c       2014-04-21 12:28:17.617685752 +0200
+++ packet.c    2014-04-21 12:29:14.607532001 +0200
@@ -1431,8 +1431,10 @@
         * return length of payload (without type field)
         */
        type = buffer_get_char(&active_state->incoming_packet);
-       if (type < SSH2_MSG_MIN || type >= SSH2_MSG_LOCAL_MIN)
+        if (type < SSH2_MSG_MIN)
                packet_disconnect("Invalid ssh2 packet type: %d", type);
+        else if (type >= SSH2_MSG_LOCAL_MIN && type <= SSH2_MSG_LOCAL_MAX)
+                type = SSH2_MSG_IGNORE;
        if (type == SSH2_MSG_NEWKEYS)
                set_newkeys(MODE_IN);
        else if (type == SSH2_MSG_USERAUTH_SUCCESS &&


and put it into /etc/portage/patches/net-misc/openssh

Luckily, the openssh ebuild has the epatch_user command enabled by default.

I've got the patch from here: https://lists.mindrot.org/pipermail/openssh-unix-dev/2008-February/026180.html

However, I am not very confident in this patch.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13493

PostPosted: Wed Apr 23, 2014 1:47 am    Post subject: Reply with quote

mansonquasch wrote:
However, I am not very confident in this patch.
What are you worried about? If you want to paper over the problem by ignoring unhandled messages, that patch should do so perfectly.

Based on the output provided, it looks like you are experiencing random bad data in the TCP stream carrying the ssh connection.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum