Skip to content
Snippets Groups Projects
  • Rob Swindell's avatar
    b25b5734
    Fix false "SUSPECTED BOUNCE ATTACK ATTEMPT" for IPv6 FTP-data connections · b25b5734
    Rob Swindell authored
    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
    b25b5734
    History
    Fix false "SUSPECTED BOUNCE ATTACK ATTEMPT" for IPv6 FTP-data connections
    Rob Swindell authored
    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