-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
1 changed file
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters