zephyr/subsys
Robert Lubos 7deabaa77b net: tcp: Fix possible double TCP context dereferencing
In case TCP connection is being closed from the TCP stack, due to for
instance retransmission timeout, the stack should also switch the TCP
state to CLOSED. Otherwise, there was a risk of dereferencing the TCP
context twice, for example if the application was in active socket
send(), and tried to reschedule data transmission.

Additionally, make sure that the TCP_CLOSED state handling is a no-op
state - otherwise, there is a risk that if packets keep incoming before
the application dereferences the TCP context on its side, TCP stack
will incorrectly dereference the context for the second time from
within due to current TCP_CLOSED state logic.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-06-06 11:11:22 -04:00
..
bluetooth
canbus
console
debug
demand_paging
dfu
disk
dsp
emul
fb
fs
input
ipc
jwt
logging
lorawan
mgmt
modbus
net
pm
portability
random
retention
rtio
sd
settings
shell
sip_svc
stats
storage
task_wdt
testsuite
timing
tracing
usb
zbus
CMakeLists.txt
Kconfig