freebsd-skq/sys
Randall Stewart 13c0e198ca tcp: Fix bugs related to the PUSH bit and rack and an ack war
Michaels testing with UDP tunneling found an issue with the push bit, which was only partly fixed
in the last commit. The problem is the left edge gets transmitted before the adjustments are done
to the send_map, this means that right edge bits must be considered to be added only if
the entire RSM is being retransmitted.

Now syzkaller also continued to find a crash, which Michael sent me the reproducer for. Turns
out that the reproducer on default (freebsd) stack made the stack get into an ack-war with itself.
After fixing the reference issues in rack the same ack-war was found in rack (and bbr). Basically
what happens is we go into the reassembly code and lose the FIN bit. The trick here is we
should not be going into the reassembly code if tlen == 0 i.e. the peer never sent you anything.
That then gets the proper action on the FIN bit but then you end up in LAST_ACK with no
timers running. This is because the usrclosed function gets called and the FIN's and such have
already been exchanged. So when we should be entering FIN_WAIT2 (or even FIN_WAIT1) we get
stuck in LAST_ACK. Fixing this means tweaking the usrclosed function so that we properly
recognize the condition and drop into FIN_WAIT2 where a timer will allow at least TP_MAXIDLE
before closing (to allow time for the peer to retransmit its FIN if the ack is lost). Setting the fast_finwait2
timer can speed this up in testing.

Reviewed by: mtuexen,rscheff
Sponsored by: Netflix Inc
Differential Revision:	https://reviews.freebsd.org/D30451
2021-05-25 13:23:31 -04:00
..
amd64 amd64: clear PSL.AC in the right frame 2021-05-25 18:20:46 +03:00
arm arm: RPI-B: Add ext_resources driver 2021-05-24 12:53:00 +02:00
arm64 arm64, riscv: remove reference to fsu_intr_fault 2021-05-25 12:26:52 -03:00
bsm
cam cam_sim: style: sort includes 2021-05-25 09:56:56 -06:00
cddl fbt: Remove some handling for multiple CTF containers 2021-04-02 17:49:13 -04:00
compat There is a window where threads are removed from the process list and where 2021-05-21 13:18:41 +02:00
conf mmc: Only build mmc_fdt_helper and mmc_pwrseq for arch that uses ext_resources 2021-05-21 19:35:20 +02:00
contrib sys/*/conf/*, docs: fix links to handbook 2021-05-20 09:27:10 +01:00
crypto ossl: Don't encryt/decrypt too much data for chacha20. 2021-04-01 15:49:07 -07:00
ddb fix style nit: space after if 2021-05-05 15:26:09 -06:00
dev cxgbe(4): Overhaul CLIP (Compressed Local IPv6) table management. 2021-05-23 16:07:29 -07:00
dts arm64: rockchip: Add some DTSO to disable sd/mmc 2021-05-13 18:15:31 +02:00
fs nfscl: Add hash lists for the NFSv4 opens 2021-05-22 14:53:56 -07:00
gdb gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
geom gmultipath: make physpath distinct from the underlying providers' 2021-05-06 12:32:27 -06:00
gnu
i386 sys/*/conf/*, docs: fix links to handbook 2021-05-20 09:27:10 +01:00
isa Remove more remnants of sio(4) 2021-04-07 14:33:02 -04:00
kern Clean up some of the core dumping code. 2021-05-25 16:30:32 +01:00
kgssapi
libkern Use '.arch_extension crc' in the arm64 crc32 code 2021-05-06 07:42:35 +00:00
mips [ar71xx] During reset, don't spin, just keep trying 2021-05-22 15:53:00 -07:00
modules modules: Only build sdhci_fdt for arm and arm64 2021-05-13 20:23:59 +02:00
net pf: Track the original kif for floating states 2021-05-20 12:49:27 +02:00
net80211 net80211: prefix get_random_bytes() with net80211_ 2021-03-24 22:16:09 +00:00
netgraph Fix packet cbs/ebs conversion. 2021-05-19 11:04:08 -04:00
netinet tcp: Fix bugs related to the PUSH bit and rack and an ack war 2021-05-25 13:23:31 -04:00
netinet6 Fix mbuf leaks in various pru_send implementations 2021-05-12 13:00:09 -04:00
netipsec Add missing sockaddr length and family validation to various protocols 2021-05-03 13:35:19 -04:00
netpfil pf: fix ioctl() memory leak 2021-05-24 15:56:24 +02:00
netsmb
nfs Fix panic when using BOOTP to resolve root path. 2021-03-28 14:02:40 -05:00
nfsclient nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nfsserver nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nlm
ofed Add missing sockaddr length and family validation to various protocols 2021-05-03 13:35:19 -04:00
opencrypto cryptodev: Fix some input validation bugs 2021-05-11 17:36:12 -04:00
powerpc cam: clear on-stack CCBs in last few drivers 2021-05-21 08:53:59 +01:00
riscv arm64, riscv: remove reference to fsu_intr_fault 2021-05-25 12:26:52 -03:00
rpc nfsd: fix a NFSv4.1 Linux client mount stuck in CLOSE_WAIT 2021-04-27 15:32:35 -07:00
security tcp_input/syncache: acquire only read lock on PCB for SYN,!ACK packets 2021-04-12 08:25:31 -07:00
sys sys_process.c: extract ptrace_unsuspend() 2021-05-25 18:22:27 +03:00
teken
tests Revise FIB lookups per second benchmarking routines. 2021-05-05 12:28:17 +02:00
tools makesyscalls.lua: improve generated file style(9) compliance 2021-05-13 13:59:25 -04:00
ufs Move mnt_maxsymlinklen into appropriate fs mount data structures 2021-05-22 15:16:09 +03:00
vm vm: add another pager private flag 2021-05-15 20:47:29 +00:00
x86 x86/xen: further PVHv1 removal cleanup 2021-05-18 10:43:31 +02:00
xdr
xen x86/xen: remove PVHv1 code 2021-05-17 11:41:21 +02:00
Makefile