diff options
| author | 2026-05-27 11:24:11 +0800 | |
|---|---|---|
| committer | 2026-05-28 16:36:08 -0700 | |
| commit | f14fe6395a8b3d961a61e138ad7b36ba3626dd4e (patch) | |
| tree | 8ceb3246932a734cb62b7c0d2d2aef8dcfe42270 /tools/perf/arch/ssh:/git@git.zx2c4.com/git: | |
| parent | Merge branch 'net-mana-fix-null-dereferences-during-teardown-after-attach-failure' (diff) | |
sctp: fix race between sctp_wait_for_connect and peeloff
sctp_wait_for_connect() drops and re-acquires the socket lock while
waiting for the association to reach ESTABLISHED state. During this
window, another thread can peeloff the association to a new socket via
getsockopt(SCTP_SOCKOPT_PEELOFF), changing asoc->base.sk. After
re-acquiring the old socket lock, sctp_wait_for_connect() returns
success without noticing the migration — the caller then accesses
the association under the wrong lock in sctp_datamsg_from_user().
Add the same sk != asoc->base.sk check that sctp_wait_for_sndbuf()
already has, returning an error if the association was migrated while
we slept.
Fixes: 668c9beb9020 ("sctp: implement assign_number for sctp_stream_interleave")
Signed-off-by: Zhenghang Xiao <kipreyyy@gmail.com>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20260527032411.60959-1-kipreyyy@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/arch/ssh:/git@git.zx2c4.com/git:')
0 files changed, 0 insertions, 0 deletions
