diff options
| author | Hyunwoo Kim <imv4bel@gmail.com> | 2026-08-19 10:38:37 +0900 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-08-20 13:31:09 -0700 |
| commit | 03a9d10ecf71f54b2af8020935f2033d4a132be5 (patch) | |
| tree | 88c87b99b0217fe95a9a8d69f7f63144a4f2efe8 /tools/perf/scripts/python | |
| parent | 25b863cd6d12ec196115ff7a5422c69995443466 (diff) | |
| download | linux-03a9d10ecf71f54b2af8020935f2033d4a132be5.tar.gz linux-03a9d10ecf71f54b2af8020935f2033d4a132be5.zip | |
sctp: drop a chunk if its transport was removed
sctp_rcv() resolves the transport once per packet and leaves it in
chunk->transport. The lookup reference, or the one sctp_add_backlog() takes
if the socket is owned by userspace, keeps it around until the chunk has
been processed.
An authenticated ASCONF DEL-IP can remove it in the meantime.
sctp_assoc_rm_peer() takes the transport out of the association and calls
sctp_transport_free(), which tags it dead and drops the reference the
association held. There is a window on both paths: the packet can sit on
the socket backlog, and on the direct path the lookup completes before
bh_lock_sock().
The DATA chunk in that packet puts the removed transport back into
asoc->peer.last_data_from. Once the packet is done that reference goes
away and the transport is freed by RCU, so the next delayed SACK carries
the pointer into the SACK chunk and sctp_outq_select_transport() reads the
freed transport's state.
Drop the chunk in sctp_inq_push(), next to the existing rcvr->dead check.
Both paths reach it with the association's socket lock held. The peer
retransmits it.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/aoUJHQmxL0LFIMCw@v4bel
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
