1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00
freebsd/sys
Gleb Smirnoff 3220a2121c FreeBSD-SA-14:19.tcp raised attention to the state of our stack
towards blind SYN/RST spoofed attack.

Originally our stack used in-window checks for incoming SYN/RST
as proposed by RFC793. Later, circa 2003 the RST attack was
mitigated using the technique described in P. Watson
"Slipping in the window" paper [1].

After that, the checks were only relaxed for the sake of
compatibility with some buggy TCP stacks. First, r192912
introduced the vulnerability, just fixed by aforementioned SA.
Second, r167310 had slightly relaxed the default RST checks,
instead of utilizing net.inet.tcp.insecure_rst sysctl.

In 2010 a new technique for mitigation of these attacks was
proposed in RFC5961 [2]. The idea is to send a "challenge ACK"
packet to the peer, to verify that packet arrived isn't spoofed.
If peer receives challenge ACK it should regenerate its RST or
SYN with correct sequence number. This should not only protect
against attacks, but also improve communication with broken
stacks, so authors of reverted r167310 and r192912 won't be
disappointed.

[1] http://bandwidthco.com/whitepapers/netforensics/tcpip/TCP Reset Attacks.pdf
[2] http://www.rfc-editor.org/rfc/rfc5961.txt

Changes made:

o Revert r167310.
o Implement "challenge ACK" protection as specificed in RFC5961
  against RST attack. On by default.
  - Carefully preserve r138098, which handles empty window edge
    case, not described by the RFC.
  - Update net.inet.tcp.insecure_rst description.
o Implement "challenge ACK" protection as specificed in RFC5961
  against SYN attack. On by default.
  - Provide net.inet.tcp.insecure_syn sysctl, to turn off
    RFC5961 protection.

The changes were tested at Netflix. The tested box didn't show
any anomalies compared to control box, except slightly increased
number of TCP connection in LAST_ACK state.

Reviewed by:	rrs
Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-09-16 11:07:25 +00:00
..
amd64 Add a sysctl to export the EFI memory map along with a handler in the 2014-09-13 03:10:02 +00:00
arm The private peripheral interrupts start at offset 16, not 0. Also, use 2014-09-15 15:36:00 +00:00
boot add gptzfsboot.8, zfsboot.8 and zfsloader.8 manual pages 2014-09-15 06:21:28 +00:00
bsm IFp4 @1192291: 2014-04-07 20:44:00 +00:00
cam Add quirks to disable READ CAPACITY (16) for PNY USB 3.0 Flash Drives. 2014-09-15 19:48:27 +00:00
cddl Added missing ZFS sysctls 2014-09-14 12:23:00 +00:00
compat Add missing proctree locking to fill_kinfo_proc consumers. 2014-08-30 03:10:55 +00:00
conf Disable flow-director support until it's been debugged and verified. 2014-09-15 21:09:19 +00:00
contrib Add iwn-100 firmware. 2014-08-28 00:05:02 +00:00
crypto Put the aesni_cipher_setup() and aesni_cipher_process() functions into 2014-06-24 06:55:49 +00:00
ddb ins is only set and unused, but only when we're not doing software 2014-08-14 16:01:51 +00:00
dev The error bits are not valid with EOP=0; so intermediary fragments should 2014-09-15 20:54:12 +00:00
fs Provide the unique implementation for the VOP_GETPAGES() method used 2014-09-15 12:28:29 +00:00
gdb Add support for gdb's memory searching capabilities to our in-kernel gdb 2014-09-05 16:40:47 +00:00
geom Cache GELI passphrases entered at the console during the boot process, 2014-09-16 08:40:52 +00:00
gnu Merge forgotten .h files from vendor branch. 2014-09-05 02:21:45 +00:00
i386 MFamd64: Use initializecpu() to set various model-specific registers on 2014-09-10 21:37:47 +00:00
isa Remove vestiges of knowing the ISA bus, which we gave up on around 20 2014-03-19 21:03:04 +00:00
kern Modify cpuset_setithread() to take a CPU ID as an integer, not a char. 2014-09-16 01:21:47 +00:00
kgssapi
libkern Use __DECONST to avoid compiler warnings (and thus build failures) 2014-09-08 08:12:09 +00:00
mips Fix RTC clock writes on many Octeon boards. 2014-09-14 00:02:40 +00:00
modules Disable flow-director support until it's been debugged and verified. 2014-09-15 21:09:19 +00:00
net Revert r271504. A new patch to solve this issue will be made. 2014-09-13 20:52:01 +00:00
net80211 After much toying around with this AMRR initial rate stuff, 2014-08-20 09:10:03 +00:00
netgraph Remove any stale mbuf tags from packets being injected into a netgraph 2014-07-01 07:54:12 +00:00
netinet FreeBSD-SA-14:19.tcp raised attention to the state of our stack 2014-09-16 11:07:25 +00:00
netinet6 Revisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and 2014-09-11 20:21:03 +00:00
netipsec Change pr_output's prototype to avoid the need for explicit casts. 2014-08-15 02:43:02 +00:00
netnatm
netpfil - Provide a sleepable lock to protect against ioctl() vs ioctl() races. 2014-09-12 08:39:15 +00:00
netsmb Remove redundant unlock. 2014-04-17 12:22:08 +00:00
nfs Fix/improve fhe_stats sysctl output. 2014-06-14 12:26:12 +00:00
nfsclient Avoid an exclusive acquisition of the object lock on the expected execution 2014-09-14 18:07:55 +00:00
nfsserver Change NFS readdir() to only ignore cookies preceding the given offset for 2014-07-01 20:00:35 +00:00
nlm Correct a typo in nlm_find_host_by_addr(): the intention of the 2014-03-11 00:25:55 +00:00
ofed Revert r271504. A new patch to solve this issue will be made. 2014-09-13 20:52:01 +00:00
opencrypto Fix various issues with invalid file operations: 2014-09-12 21:29:10 +00:00
pc98 MFamd64: Use initializecpu() to set various model-specific registers on 2014-09-10 21:37:47 +00:00
pci Fix various NIC drivers to properly cleanup static DMA resources. 2014-06-11 14:53:58 +00:00
powerpc Rename OF_xref_phandle() to OF_node_from_xref() and add a new function 2014-09-01 18:51:01 +00:00
rpc Merge the NFSv4.1 server code in projects/nfsv4.1-server over 2014-07-01 20:47:16 +00:00
security Replace dev_clone with cdevpriv(9) KPI in audit_pipe code. 2014-08-20 16:04:30 +00:00
sparc64 Create a separate structure for per-CPU state saved across suspend and 2014-09-06 15:23:28 +00:00
sys Modify cpuset_setithread() to take a CPU ID as an integer, not a char. 2014-09-16 01:21:47 +00:00
teken
tools Allow the make_dtb script to work outside of a "make buildkernel" context 2014-08-30 22:39:15 +00:00
ufs Provide the unique implementation for the VOP_GETPAGES() method used 2014-09-15 12:28:29 +00:00
vm Add stricter checking of some mmap() arguments: 2014-09-15 17:20:13 +00:00
x86 xen: don't set suspend/resume methods for the PIRQ PIC 2014-09-15 15:15:52 +00:00
xdr
xen xen: implement event channel PIRQ support 2014-08-04 08:42:29 +00:00
Makefile Remove ia64. 2014-07-07 00:27:09 +00:00