Bug 2941 - Transferring large files yields error: ssh_dispatch_run_fatal: message authentication code incorrect
Summary: Transferring large files yields error: ssh_dispatch_run_fatal: message authen...
Status: CLOSED DUPLICATE of bug 845
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: scp (show other bugs)
Version: 7.9p1
Hardware: Other Linux
: P5 major
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-07 15:47 AEDT by Dan
Modified: 2019-05-03 14:42 AEST (History)
1 user (show)

See Also:


Attachments
Output of scp -v -v -v (14.44 KB, text/plain)
2018-12-07 15:47 AEDT, Dan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan 2018-12-07 15:47:58 AEDT
Created attachment 3214 [details]
Output of scp -v -v -v

scp cannot transfer large files (multi gigabyte) reliably from the server to the client. The client always dies in mid-transfer with the message:

  ssh_dispatch_run_fatal: Connection to 11.22.33.44 port 33333: message authentication code incorrect
  lost connection

In my case, the server is an Ubuntu 18.04 VM on Linode, and the client is an Ubuntu 16.04 workstation. The problem occurs with the supplied 16.04 ssh client (OpenSSH_7.2p2) as well as the latest hand-compiled OpenSSH client (OpenSSH_7.9p1).

Server version information:

$ uname -a
Linux myhost 4.18.16-x86_64-linode118 #1 SMP PREEMPT Mon Oct 29 15:38:25 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ ssh -V
OpenSSH_7.6p1 Ubuntu-4ubuntu0.1, OpenSSL 1.0.2n  7 Dec 2017

Client version information:

$ uname -a
Linux example 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ ssh -V
OpenSSH_7.9p1, OpenSSL 1.0.2g  1 Mar 2016

The only options in my ~/.ssh/config (other than User and HostName and Port) were:

 Protocol 2
 StrictHostKeyChecking yes
 ForwardAgent no

Attached is the (sanitized) output of:

$ scp -v -v -v myhost:mydir/myfile .  2> logfile.txt
Comment 1 Dan 2018-12-07 15:49:12 AEDT
I should mention, the problem *never* happens when copying files in the other direction, from the client to the server.
Comment 2 Darren Tucker 2018-12-07 16:09:35 AEDT
This indicates that the Message Authentication Code (ie the packet integrity check) failed, likely due to a packet being modified in transit.  The error message has changed due to some infrastructure changes but this is the same as bug#845 and bug#510.

Things that have been known cause this in the past:
 - buggy or faulty network devices modifying packets in transit (Linksys devices used to be notorious for it, eg bug#510).
 - buggy NIC hardware, firmware or drivers, particularly TCP offload.
 - bad RAM
 - buggy compilers, particularly miscompiled OpenSSL libraries

I don't recall any instance where it was actually a problem in OpenSSH itself.  If you do figure it out, please add whatever you find to bug#845.

*** This bug has been marked as a duplicate of bug 845 ***
Comment 3 Damien Miller 2019-05-03 14:42:31 AEST
Move resolved bugs -> CLOSED after 8.0 release