Bug 286181

Summary: Connection aborted on large data -R transfer
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: opensshAssignee: Tomas Mraz <tmraz>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openssh-4.7p1-2.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-24 14:59:30 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
Full SSH client output
none
Workaround - undo one patch of the version upgrade. none

Description Jan Kratochvil 2007-09-11 11:28:11 EDT
Description of problem:
Using SSH port forwarding for mail transfers, large mails abort it.

Version-Release number of selected component (if applicable):
openssh-4.7p1-1.fc8
Fixed by a downgrade to: openssh-4.5p1-6.fc7
remote: openssh-3.1p1-14.3.legacy.i386 (RHEL 7.3)

How reproducible:
It was reproducible on one specific mail, I expect it would be easily
reproducible again.

Steps to Reproduce:
1. ssh -v -t -R 2852:127.0.0.1:852 REMOTE sleep-command
   specifically: ssh -v -t -L 2525:127.0.0.1:25 -R 2852:127.0.0.1:852 -R
2022:127.0.0.1:22 paulina.vellum.cz 'while :;do echo -n .;sleep 1m;done';sleep
1m;done
2. Start transfer at the REMOTE host to port 2852.

Actual results:
local ssh:
debug1: channel 3: new [127.0.0.1]
debug1: confirm forwarded-tcpip
debug3: channel 3: waiting for connection
debug1: channel 3: connected
...debug2: channel 3: window 935334 sent adjust 1161818
debug2: channel 3: window 966656 sent adjust 1130496
buffer_get_string_ret: bad string length 557056
buffer_get_string: buffer error

custom transfer app: DIE: Got 1724408 out of the required 6377714 bytes

local ssh strace:
select(10, [3 4 5 6 9], [], NULL, {60, 0}) = 1 (in [3], left {59, 909000})
read(3,
"\324\20\200\37#0\301\345<\220\211\20W\274$Wl\35|\260\251d\262q\30)\17\5\271\204\311\230"...,
8192) = 1448
brk(0x2aaaaad36000)                     = 0x2aaaaacfd000
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aaaae039000
mmap(NULL, 692224, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aaaae139000
write(2, "buffer_get_string_ret: bad strin"..., 49) = 49
write(2, "buffer_get_string: buffer error\r"..., 33) = 33
ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
exit_group(255)                         = ?

Expected results:
Seamless transfers as with the older F7 openssh.

Additional info:
So far not tried to debug it.  Not tried against newer SSH server.
Comment 1 Jan Kratochvil 2007-09-11 11:28:11 EDT
Created attachment 192601 [details]
Full SSH client output
Comment 2 Tomas Mraz 2007-09-12 09:50:02 EDT
I've put your bug into upstream bugzilla here:
https://bugzilla.mindrot.org/show_bug.cgi?id=1360

Can you please provide the needed info which Damien Miller asks for? You don't
have to create account to that bugzilla if you don't want to, I'll put a comment
there as soon as you attach it here.
Comment 3 Jan Kratochvil 2007-09-17 15:49:52 EDT
Created attachment 197761 [details]
Workaround - undo one patch of the version upgrade.

Details are being discussed upstream.
Comment 4 Jan Kratochvil 2007-09-17 15:51:15 EDT
Comment 3 undoes (I hope) the change:
   - markus@cvs.openbsd.org 2007/06/11 09:14:00
     [channels.h]
     increase default channel windows; ok djm