zephyr/subsys/net
Ravi kumar Veeramally 1a6f4a6368 net: tcp: Accept connections only in LISTENING state
Issue noticed with following scenario.

 1) TCP server is listening for connections but will handle
    only one connection at a time (e.g. echo-server sample)
 2) Client A connects, and the connection is accepted.
 3) Client B connects, instead of denying a connection,
    it is "auto" accepted (this is the actual bug) even
    if the application has not called accept().
 4) After the connection A is closed, the connection B
    gets accepted by application but now the closed
    connection A will cause confusion in the net-stack
 5) This confusion can cause memory leak or double free
    in the TCP core.

It is not easy to trigger this issue because it depends
on timing of the connections A & B.

Fixes: #18308

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-09-10 22:57:48 +03:00
..
ip net: tcp: Accept connections only in LISTENING state 2019-09-10 22:57:48 +03:00
l2 net: Add CONFIG_NET_NATIVE option for selecting native IP 2019-09-10 12:45:38 +03:00
lib net: tcp: Accept connections only in LISTENING state 2019-09-10 22:57:48 +03:00
buf.c
CMakeLists.txt
hostname.c
Kconfig
Kconfig.hostname
Kconfig.template.log_config.default.net
Kconfig.template.log_config.net