Re:SACK Panic – Multiple TCP-based remote denial-of-service ...
by isodude on Tuesday June 18, 2019 @06:47AM
(#20211533)
I read in a note just below --set-mss in man iptables-extensions that iptables will not increase mss if it's already lower than what set in --set-mss.
Re:SACK Panic – Multiple TCP-based remote denial-of-service ...
by LinuxBender on Tuesday June 18, 2019 @07:36AM
(#20211867)
Good catch, I totally missed that.
Re:SACK Panic – Multiple TCP-based remote denial-of-service ...
by isodude on Tuesday June 18, 2019 @07:37AM
(#20211879)
I did miss it at first also, but wondered why it didn't increase the value.
Re:SACK Panic – Multiple TCP-based remote denial-of-service ...
by LinuxBender on Tuesday June 18, 2019 @07:45AM
(#20211936)
I'd have to dig into the source code of that module. It makes sense to not raise it artificially higher than the requesting host. I just didn't expect them to have that logic. IPTables usually blindly does whatever bad idea I give it. :-)
Re:SACK Panic – Multiple TCP-based remote denial-of-service ...
by cesarb on Tuesday June 18, 2019 @11:03AM
(#20213862)
Increasing the value would cause problems. If the remote end says its MSS is 512 octets, either it doesn't have enough memory to receive larger packets, or its link MTU is small enough that larger packets will always get dropped.
This goes in the mangle table. DO NOT use this example unless you know for sure what you are doing.
This example should work for most use cases, but don't do this unless you for sure know the implications. Dropping bad inbound options is easy, but outbound can get more complicated. I am just showing this in case anyone asks and I am asleep. :-) Talk to your network admins and ask what is the highest mss/mtu your VPN's and 3rd party networks support.This may not even help, as the packet has already been generated and we are too late in the process. I just figure someone might ask. There are probably use cases where this may help (for proxies, edge firewalls, hypervisors, docker hosts, maybe)
Or just log and drop the connections, or send yourself (your app) a tcp-reset.