hfiref0x / LightFTP

Small x86-32/x64 FTP Server
BSD 2-Clause "Simplified" License
232 stars 83 forks source link

Incorrect PASV response #1

Closed ve3jrw closed 6 years ago

ve3jrw commented 7 years ago

The server response to the PASV request appears to be incorrect. This doesn't result in any failures, however FTP clients perform bogus retries as a result.

Wireshark capture from a correct response looks like:

Frame 472: 115 bytes on wire (920 bits), 115 bytes captured (920 bits) on interface 0 Ethernet II, Src: Dell_d0:c6:43 (48:4d:7e:d0:c6:43), Dst: JdsuFran_60:08:6f (00:22:bc:60:08:6f) Internet Protocol Version 4, Src: 10.14.20.57, Dst: 10.14.21.76 Transmission Control Protocol, Src Port: 21, Dst Port: 53774, Seq: 223, Ack: 76, Len: 49 File Transfer Protocol (FTP) 227 Entering Passive Mode (10,14,20,57,202,145)\r\n Response code: Entering Passive Mode (227) Response arg: Entering Passive Mode (10,14,20,57,202,145) Passive IP address: 10.14.20.57 Passive port: 51857

From LightFTP:

Frame 100: 93 bytes on wire (744 bits), 93 bytes captured (744 bits) on interface 0 Ethernet II, Src: Dell_d0:c6:43 (48:4d:7e:d0:c6:43), Dst: JdsuFran_60:08:6f (00:22:bc:60:08:6f) Internet Protocol Version 4, Src: 10.14.20.57, Dst: 10.14.21.76 Transmission Control Protocol, Src Port: 21, Dst Port: 53783, Seq: 133, Ack: 76, Len: 27 File Transfer Protocol (FTP) 227 Entering Passive Mode ( Response code: Entering Passive Mode (227) Response arg: Entering Passive Mode (

The interface information in round brackets is missing.

ve3jrw commented 7 years ago

Neglected to mention this is using the Windows version