This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mptcp: correct refcnt for sk in tcp_v{4,6}_rcv
When we receive an skb in tcp_vX_rcv if the sock is hold by user we copy the sk inside the skb before putting the skb inside the backlog, the sk will be used after from mptcp_backlog_rcv. If the sk refcnt is not done properly the sk read from mptcp_backlog_rcv could point to another sk because it may have been freed and reused in the mean time. In mptcp_backlog_rcv, the call to skb_oprhan will call the destructor that we set for the skb and decrement the sk refcnt. Note that we call skb_oprhan after the increase of sk_refcnt. This ensures that we never free the sk too quickly. Adaptation of commit 952bd28 (mptcp: correct refcnt for sk in tcp_v{4,6}_rcv) for mptcp_trunk. Fixes: Zero-day-bug Signed-off-by: Gregory Detal <[email protected]> Signed-off-by: Benjamin Hesmans <[email protected]> Signed-off-by: Matthieu Baerts <[email protected]> Signed-off-by: Christoph Paasch <[email protected]>
- Loading branch information
Showing
4 changed files
with
20 additions
and
4 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
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
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
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