linux/net/sctp
Xin Long f5c564076d sctp: fix missing encap_port propagation for GSO fragments
[ Upstream commit bf6f95ae3b ]

encap_port in SCTP_INPUT_CB(skb) is used by sctp_vtag_verify() for
SCTP-over-UDP processing. In the GSO case, it is only set on the head
skb, while fragment skbs leave it 0.

This results in fragment skbs seeing encap_port == 0, breaking
SCTP-over-UDP connections.

Fix it by propagating encap_port from the head skb cb when initializing
fragment skbs in sctp_inq_pop().

Fixes: 046c052b47 ("sctp: enable udp tunneling socks")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Link: https://patch.msgid.link/ea65ed61b3598d8b4940f0170b9aa1762307e6c3.1776017631.git.lucien.xin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-06-01 17:35:29 +02:00
..
associola.c net/sctp: Prevent autoclose integer overflow in sctp_association_init() 2025-01-09 13:28:50 +01:00
auth.c sctp: handle the error returned from sctp_auth_asoc_init_active_key 2022-10-26 12:34:48 +02:00
bind_addr.c sctp: fail if no bound addresses can be used for a given scope 2023-02-01 08:27:27 +01:00
chunk.c net: sctp: chunk.c: delete duplicated word 2020-08-24 16:21:43 -07:00
debug.c sctp: add the probe timer in transport for PLPMTUD 2021-06-22 11:28:52 -07:00
diag.c sctp: Hold sock lock while iterating over address list 2025-12-07 06:09:26 +09:00
endpointola.c sctp: use call_rcu to free endpoint 2022-01-05 12:42:35 +01:00
input.c sctp: linearize cloned gso packets in sctp_rcv 2025-08-28 16:24:16 +02:00
inqueue.c sctp: fix missing encap_port propagation for GSO fragments 2026-06-01 17:35:29 +02:00
ipv6.c sctp: initialize more fields in sctp_v6_from_sk() 2025-09-04 14:28:46 +02:00
Kconfig sctp: create udp4 sock and add its encap_rcv 2020-10-30 15:23:52 -07:00
Makefile sctp: rename sctp_diag.c as diag.c 2018-02-13 13:56:31 -05:00
objcnt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 104 2019-05-24 17:39:00 +02:00
offload.c sctp: remove the NETIF_F_SG flag before calling skb_segment 2021-01-16 19:05:59 -08:00
output.c sctp: allow IP fragmentation when PLPMTUD enters Error state 2021-11-18 19:16:43 +01:00
outqueue.c sctp: clear out_curr if all frag chunks of current msg are pruned 2022-12-02 17:40:59 +01:00
primitive.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 104 2019-05-24 17:39:00 +02:00
proc.c sctp: move hlist_node and hashent out of sctp_ep_common 2024-08-19 05:45:35 +02:00
protocol.c ip: Fix data-races around sysctl_ip_nonlocal_bind. 2022-07-29 17:25:13 +02:00
sm_make_chunk.c sctp: Fix MAC comparison to be constant-time 2025-10-19 16:21:46 +02:00
sm_sideeffect.c sctp: handle invalid error codes without calling BUG() 2023-09-19 12:22:29 +02:00
sm_statefuns.c sctp: move SCTP_CMD_ASSOC_SHKEY right after SCTP_CMD_PEER_INIT 2026-02-06 16:41:52 +01:00
sm_statetable.c sctp: add the probe timer in transport for PLPMTUD 2021-06-22 11:28:52 -07:00
socket.c sctp: revalidate list cursor after sctp_sendmsg_to_asoc() in SCTP_SENDALL 2026-06-01 17:35:26 +02:00
stream.c sctp: Fix undefined behavior in left shift operation 2025-04-10 14:31:51 +02:00
stream_interleave.c sctp: fix a potential overflow in sctp_ifwdtsn_skip 2023-04-20 12:13:53 +02:00
stream_sched.c sctp: fix memory leak in sctp_stream_outq_migrate() 2022-12-08 11:28:41 +01:00
stream_sched_prio.c sctp: add a refcnt in sctp_stream_priorities to avoid a nested loop 2023-03-11 13:57:28 +01:00
stream_sched_rr.c sctp: fix memory leak in sctp_stream_outq_migrate() 2022-12-08 11:28:41 +01:00
sysctl.c sctp: add mutual exclusion in proc_sctp_do_udp_port() 2025-05-22 14:08:27 +02:00
transport.c sctp: prevent possible shift-out-of-bounds in sctp_transport_update_rto 2025-12-07 06:09:27 +09:00
tsnmap.c net: sctp: trivial: fix typo in comment 2021-03-04 13:48:32 -08:00
ulpevent.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-31 17:48:46 -07:00
ulpqueue.c net: sctp: ulpqueue.c: delete duplicated word 2020-08-24 16:21:43 -07:00