[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170208.131259.2256112727442196980.davem@davemloft.net>
Date: Wed, 08 Feb 2017 13:12:59 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: xiyou.wangcong@...il.com
Cc: netdev@...r.kernel.org, dvyukov@...gle.com
Subject: Re: [Patch net] sit: fix a double free on error path
From: Cong Wang <xiyou.wangcong@...il.com>
Date: Wed, 8 Feb 2017 10:02:13 -0800
> Dmitry reported a double free in sit_init_net():
...
> This is because when tunnel->dst_cache init fails, we free dev->tstats
> once in ipip6_tunnel_init() and twice in sit_init_net(). This looks
> redundant but its ndo_uinit() does not seem enough to clean up everything
> here. So avoid this by setting dev->tstats to NULL after the first free,
> at least for -net.
>
> Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Good catch, applied and queued up for -stable, thanks!
Powered by blists - more mailing lists