summaryrefslogtreecommitdiff
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2020-02-18 07:07:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-11 20:02:47 +0300
commit4dfb4833a549dfdf3b6771d722c08140fbe9c137 (patch)
tree363b2c7d7e3d0fd588ce876430ce432ca3659223 /net/ipv6/addrconf.c
parenta1229fc80189667f6f5e6bf4a8c271ed3b973958 (diff)
downloadlinux-4dfb4833a549dfdf3b6771d722c08140fbe9c137.tar.xz
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>
Diffstat (limited to 'net/ipv6/addrconf.c')
0 files changed, 0 insertions, 0 deletions