Fix false "SUSPECTED BOUNCE ATTACK ATTEMPT" for IPv6 FTP-data connections
This bug only impacted non-passive FTP connections. Using an FTP client with active (not passive) data connections over an IPv6 connection would false-trigger the "bounce attack" detection and the FTP server responded with "504 Bad port number" and logged a hack attempt in data/hack.log. The issue was that we were comparing the socket address structure (which contains other fields besides the address itself) between the control and proposed-data connections. While this logic worked okay for IPv4, it did not for IPv6 (the 2 structs contained some non-address differences). Rather than modify the socket address structures to match where needed, I'm just comparing the string representation of the addresses, since that's what we really care about anyway. Thank to "mark i" of Truck Stop BBS for alerting me to this issue
parent
218a0ca5
No related branches found
No related tags found
Loading
Please register or sign in to comment