[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20191224.160821.1089187984359085837.davem@davemloft.net>
Date: Tue, 24 Dec 2019 16:08:21 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: marcelo.leitner@...il.com
Cc: netdev@...r.kernel.org, nhorman@...driver.com,
linux-sctp@...r.kernel.org, lucien.xin@...il.com,
syzbot+9a1bc632e78a1a98488b@...kaller.appspotmail.com,
syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH net] sctp: fix err handling of stream initialization
From: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Date: Fri, 20 Dec 2019 15:03:44 -0300
> The fix on 951c6db954a1 fixed the issued reported there but introduced
> another. When the allocation fails within sctp_stream_init() it is
> okay/necessary to free the genradix. But it is also called when adding
> new streams, from sctp_send_add_streams() and
> sctp_process_strreset_addstrm_in() and in those situations it cannot
> just free the genradix because by then it is a fully operational
> association.
>
> The fix here then is to only free the genradix in sctp_stream_init()
> and on those other call sites move on with what it already had and let
> the subsequent error handling to handle it.
>
> Tested with the reproducers from this report and the previous one,
> with lksctp-tools and sctp-tests.
>
> Reported-by: syzbot+9a1bc632e78a1a98488b@...kaller.appspotmail.com
> Fixes: 951c6db954a1 ("sctp: fix memleak on err handling of stream initialization")
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Applied and since I backported the commit mentioned in the Fixes: tag to
-stable, I queued this up for -stable as well.
Thanks.
Powered by blists - more mailing lists