Skip to content
Commit 1a6f4a63 authored by Ravi kumar Veeramally's avatar Ravi kumar Veeramally Committed by Jukka Rissanen
Browse files

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: default avatarRavi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
parent 8fa6dfbe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment