linux/net/sctp
Jun Yang 3faf13aff2 sctp: fix stream->outcnt underflow on duplicate RECONF responses
A cached RECONF chunk may contain more than one request parameter.  A
duplicate response can therefore find and process the same ADD_OUT request
again while another parameter is still outstanding, rolling back outcnt
twice and possibly underflowing it.

Track outstanding request types as bits and clear each bit after its first
response.  Later responses for the same request are then ignored.

Fixes: 11ae76e67a ("sctp: implement receiver-side procedures for the Reconf Response Parameter")
Cc: stable@kernel.org
Reported-by: TencentOS Corvus AI <corvus@tencent.com>
Link: https://lore.kernel.org/netdev/20260730110225.37371-1-juny24602@gmail.com/
Suggested-by: Xin Long <lucien.xin@gmail.com>
Assisted-by: tencentos-corvus-ai:kimi-k3
Signed-off-by: Jun Yang <junvyyang@tencent.com>
Link: https://patch.msgid.link/20260824081832.98717-3-juny24602@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-08-25 13:33:08 +02:00
..
associola.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-08-13 11:00:14 -07:00
auth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-08-13 11:00:14 -07:00
bind_addr.c sctp: validate embedded INIT chunk and address list lengths in cookie 2026-06-09 18:16:51 -07:00
chunk.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
debug.c sctp: add the probe timer in transport for PLPMTUD 2021-06-22 11:28:52 -07:00
diag.c sctp: hold socket lock when dumping endpoints in sctp_diag 2026-06-17 16:41:34 -07:00
endpointola.c sctp: auth: discard auth_chunk when skb_clone fails 2026-07-29 16:36:20 -07:00
input.c sctp: fix uninit-value in __sctp_rcv_asconf_lookup() 2026-06-09 18:12:30 -07:00
inqueue.c sctp: drop a chunk if its transport was removed 2026-08-20 13:31:09 -07:00
ipv6.c sctp: Unwind address notifier registration on failure 2026-06-10 08:28:40 -07:00
Kconfig ipv6: convert CONFIG_IPV6 to built-in only and clean up Kconfigs 2026-03-29 11:21:22 -07:00
Makefile sctp: add fair capacity stream scheduler 2023-03-09 11:31:44 +01:00
objcnt.c
offload.c sctp: use skb_crc32c() instead of __skb_checksum() 2025-05-21 15:40:16 -07:00
output.c sctp: auth: propagate HMAC calculation errors to callers 2026-08-11 10:43:54 +02:00
outqueue.c sctp: keep chunk->transport in step with the list it is queued on 2026-08-03 14:23:05 -07:00
primitive.c
proc.c net: change sock.sk_ino and sock_i_ino() to u64 2026-03-06 14:31:26 +01:00
protocol.c sctp: close UDP tunnel sockets during netns teardown 2026-07-21 14:03:32 -07:00
sm_make_chunk.c sctp: validate cookie AUTH state before use 2026-08-07 15:02:32 -07:00
sm_sideeffect.c sctp: stop processing a packet once its association is deleted 2026-08-18 09:53:48 -07:00
sm_statefuns.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-08-13 11:00:14 -07:00
sm_statetable.c sctp: add the probe timer in transport for PLPMTUD 2021-06-22 11:28:52 -07:00
socket.c sctp: fix SCTP_RESET_STREAMS stream list length limit 2026-06-27 15:39:35 -07:00
stream_interleave.c sctp: delete the nested flexible array skip 2023-04-21 08:19:29 +01:00
stream_sched_fc.c sctp: Constify struct sctp_sched_ops 2025-10-28 17:50:55 -07:00
stream_sched_prio.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
stream_sched_rr.c sctp: Constify struct sctp_sched_ops 2025-10-28 17:50:55 -07:00
stream_sched.c sctp: Constify struct sctp_sched_ops 2025-10-28 17:50:55 -07:00
stream.c sctp: fix stream->outcnt underflow on duplicate RECONF responses 2026-08-25 13:33:08 +02:00
sysctl.c net: Const qualify ctl_tables that kmemdup unconditionally 2026-08-13 13:12:24 +02:00
transport.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
tsnmap.c net: sctp: trivial: fix typo in comment 2021-03-04 13:48:32 -08:00
ulpevent.c net: remove noblock parameter from recvmsg() entities 2022-04-12 15:00:25 +02:00
ulpqueue.c sctp: remove unnecessary NULL check in sctp_ulpq_tail_event() 2022-10-20 21:43:10 -07:00