From: David Miller Date: Tue, 21 Feb 2017 18:23:51 +0000 Subject: Re: [PATCH] net/dccp: fix use after free in tw_timer_handler() Message-Id: <20170221.132351.1602433391866901233.davem@davemloft.net> List-Id: References: <20170221112740.661-1-aryabinin@virtuozzo.com> In-Reply-To: <20170221112740.661-1-aryabinin@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: dccp@vger.kernel.org From: Andrey Ryabinin Date: Tue, 21 Feb 2017 14:27:40 +0300 > DCCP doesn't purge timewait sockets on network namespace shutdown. > So, after net namespace destroyed we could still have an active timer > which will trigger use after free in tw_timer_handler(): ... > Add .exit_batch hook to dccp_v4_ops()/dccp_v6_ops() which will purge > timewait sockets on net namespace destruction and prevent above issue. > > Reported-by: Dmitry Vyukov > Signed-off-by: Andrey Ryabinin Applied and queued up for -stable, thanks.