[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180205.212254.1398375397369589049.davem@davemloft.net>
Date: Mon, 05 Feb 2018 21:22:54 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: alexey.kodanev@...cle.com
Cc: netdev@...r.kernel.org, lucien.xin@...il.com,
tommi.t.rantala@...ia.com, nhorman@...driver.com,
vyasevich@...il.com, marcelo.leitner@...il.com,
linux-sctp@...r.kernel.org
Subject: Re: [PATCH] sctp: fix dst refcnt leak in sctp_v6_get_dst()
From: Alexey Kodanev <alexey.kodanev@...cle.com>
Date: Mon, 5 Feb 2018 15:10:35 +0300
> When going through the bind address list in sctp_v6_get_dst() and
> the previously found address is better ('matchlen > bmatchlen'),
> the code continues to the next iteration without releasing currently
> held destination.
>
> Fix it by releasing 'bdst' before continue to the next iteration, and
> instead of introducing one more '!IS_ERR(bdst)' check for dst_release(),
> move the already existed one right after ip6_dst_lookup_flow(), i.e. we
> shouldn't proceed further if we get an error for the route lookup.
>
> Fixes: dbc2b5e9a09e ("sctp: fix src address selection if using secondary addresses for ipv6")
> Signed-off-by: Alexey Kodanev <alexey.kodanev@...cle.com>
Applied and queued up for -stable, thank you.
Powered by blists - more mailing lists