[Openssh] File often corrupted during transfer

Hello,

Since months I regular use a Netgear R7800 (hard drive connected in USB) to do transfers to and from using ssh (scp or sshfs).

But maybe since one or two months files get sometimes corrupted even if transfer is OK. The corruption frequency depends of computer used and file used, but with some files I don't have to make more than 5 transfers to see corruption.

used build : hnyman build (stable : 19.07 and recently 21.02, both impacted lately)

From the tests I have done, there are at least 2 working workaround :

  • Use dropbear (but slow)
  • Use hnyman master build (tested r17520) with openssh

So I suspect a problem with current SSH version. If this is the case :
OK : openssh-server 8.7p1-1
Doesn't work : openssh-server 8.4p1-4

If needed, the file I use to test is the source of nss-3.63.1 : nss-3.63.1.tar.gz
(can be downloaded here by example : http://ftp.luis.uni-hannover.de/gentoo/distfiles/11/nss-3.63.1.tar.gz)

I will do bug report for this if needed, but before would like to know if it can be reproduced and/or if I miss something.

Thank you.

ps : I'm new to openwrt, first post :tada:

Run a ip -s link to verify that there are no errors.

1 Like

Back to 21.02 with openssh, sha256sum report corrupted file at first scp and it seems there are no errors :

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    RX: bytes  packets  errors  dropped missed  mcast   
    138223     1737     0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    138223     1737     0       0       0       0       
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 44:a5:6e:47:2c:51 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast   
    3231428    3323     0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    272835     2923     0       0       0       0       
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 44:a5:6e:47:2c:50 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast   
    574731     4254     0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    2172077    3880     0       0       0       0       
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
    RX: bytes  packets  errors  dropped missed  mcast   
    0          0        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    0          0        0       0       0       0       
6: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/gre 0.0.0.0 brd 0.0.0.0
    RX: bytes  packets  errors  dropped missed  mcast   
    0          0        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    0          0        0       0       0       0       
7: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast   
    0          0        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    0          0        0       0       0       0       
8: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast   
    0          0        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    0          0        0       0       0       0       
11: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 44:a5:6e:47:2c:50 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast   
    83083642   9704     0       0       0       35      
    TX: bytes  packets  errors  dropped carrier collsns 
    2409771    7182     0       0       0       0       
12: eth1.1@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
    link/ether 44:a5:6e:47:2c:50 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast   
    494384     4205     0       0       0       22      
    TX: bytes  packets  errors  dropped carrier collsns 
    2148431    3844     0       0       0       0       
13: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc cake state UP mode DEFAULT group default qlen 1000
    link/ether 44:a5:6e:47:2c:51 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast   
    3170990    3311     0       4       0       314     
    TX: bytes  packets  errors  dropped carrier collsns 
    260345     2916     0       0       0       0       
23: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
    link/ether 44:a5:6e:47:2c:53 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast   
    0          0        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    9480       66       0       0       0       0       
24: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
    link/ether 44:a5:6e:47:2c:52 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast   
    86138606   58108    0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    337020     3403     0       0       0       0       
27: ifb4eth0.2: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc cake state UNKNOWN mode DEFAULT group default qlen 32
    link/ether d2:c6:1d:a7:85:19 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast   
    3203936    3284     0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    3203936    3284     0       0       0       0