linux-stable/net/sctp
Xin Long a7112b8eeb sctp: add vtag check in sctp_sf_ootb
[ Upstream commit 9d02831e51 ]

sctp_sf_ootb() is called when processing DATA chunk in closed state,
and many other places are also using it.

The vtag in the chunk's sctphdr should be verified, otherwise, as
later in chunk length check, it may send abort with the existent
asoc's vtag, which can be exploited by one to cook a malicious
chunk to terminate a SCTP asoc.

When fails to verify the vtag from the chunk, this patch sets asoc
to NULL, so that the abort will be made with the vtag from the
received chunk later.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-02 19:48:24 +01:00
..
associola.c net: sctp: associola.c: delete duplicated words 2020-08-24 16:21:43 -07:00
auth.c sctp: move the active_key update after sh_keys is added 2021-08-12 13:22:06 +02:00
bind_addr.c sctp: validate from_addr_param return 2021-07-19 09:44:55 +02:00
chunk.c net: sctp: chunk.c: delete duplicated word 2020-08-24 16:21:43 -07:00
debug.c
diag.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-03-12 22:34:48 -07:00
endpointola.c sctp: get netns from asoc and ep base 2019-12-09 20:14:01 -08:00
input.c sctp: break out if skb_header_pointer returns NULL in sctp_rcv_ootb 2021-10-06 15:55:52 +02:00
inqueue.c
ipv6.c sctp: validate from_addr_param return 2021-07-19 09:44:55 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
objcnt.c
offload.c
output.c sctp: get netns from asoc and ep base 2019-12-09 20:14:01 -08:00
outqueue.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
primitive.c
proc.c net: fix iteration for sctp transport seq_files 2021-02-17 11:02:29 +01:00
protocol.c sctp: move 198 addresses from unusable to private scope 2021-07-31 08:16:11 +02:00
sm_make_chunk.c sctp: account stream padding length for reconf chunk 2021-10-20 11:45:03 +02:00
sm_sideeffect.c sctp: change to hold/put transport for proto_unreach_timer 2020-11-14 11:57:12 -08:00
sm_statefuns.c sctp: add vtag check in sctp_sf_ootb 2021-11-02 19:48:24 +01:00
sm_statetable.c sctp: remove net sctp.x_enable working as a global switch 2019-08-19 18:27:29 -07:00
socket.c sctp: trim optlen when it's a huge value in sctp_setsockopt 2021-07-28 14:35:38 +02:00
stream.c net: sctp: Fix negotiation of the number of data streams. 2020-08-20 16:37:37 -07:00
stream_interleave.c sctp: get netns from asoc and ep base 2019-12-09 20:14:01 -08:00
stream_sched.c
stream_sched_prio.c
stream_sched_rr.c
sysctl.c sysctl: pass kernel pointers to ->proc_handler 2020-04-27 02:07:40 -04:00
transport.c sctp: change to hold/put transport for proto_unreach_timer 2020-11-14 11:57:12 -08:00
tsnmap.c
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