android_kernel_samsung_a7y1.../net/sctp
Xin Long 54b7a31324 sctp: move the format error check out of __sctp_sf_do_9_1_abort
[ Upstream commit 245709ec8be89af46ea7ef0444c9c80913999d99 ]

When T2 timer is to be stopped, the asoc should also be deleted,
otherwise, there will be no chance to call sctp_association_free
and the asoc could last in memory forever.

However, in sctp_sf_shutdown_sent_abort(), after adding the cmd
SCTP_CMD_TIMER_STOP for T2 timer, it may return error due to the
format error from __sctp_sf_do_9_1_abort() and miss adding
SCTP_CMD_ASSOC_FAILED where the asoc will be deleted.

This patch is to fix it by moving the format error check out of
__sctp_sf_do_9_1_abort(), and do it before adding the cmd
SCTP_CMD_TIMER_STOP for T2 timer.

Thanks Hangbin for reporting this issue by the fuzz testing.

v1->v2:
  - improve the comment in the code as Marcelo's suggestion.

Fixes: 96ca468b86b0 ("sctp: check invalid value of length parameter in error cause")
Reported-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 14:04:36 +02:00
..
associola.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
auth.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bind_addr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
chunk.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
endpointola.c sctp: change to hold sk after auth shkey is created successfully 2020-04-06 19:17:23 +02:00
input.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
inqueue.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ipv6.c sctp: fix the issue that flags are ignored when using kernel_connect 2020-04-07 09:28:40 +02:00
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
objcnt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
output.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
outqueue.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
primitive.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
probe.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
proc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
protocol.c sctp: fully initialize v4 addr in some functions 2020-04-07 13:22:20 +02:00
sm_make_chunk.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sm_sideeffect.c sctp: free cmd->obj.chunk for the unprocessed SCTP_CMD_REPLY 2020-04-07 13:29:10 +02:00
sm_statefuns.c sctp: move the format error check out of __sctp_sf_do_9_1_abort 2020-04-07 14:04:36 +02:00
sm_statetable.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
socket.c inet: stop leaking jiffies on the wire 2020-04-07 09:29:41 +02:00
ssnmap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sysctl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
transport.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tsnmap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ulpevent.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ulpqueue.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30