lkml.org 
[lkml]   [2019]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] netdevsim: Fix error handling in nsim_fib_init and nsim_fib_exit
On Fri, 11 Oct 2019 17:46:53 +0800, YueHaibing wrote:
> In nsim_fib_init(), if register_fib_notifier failed, nsim_fib_net_ops
> should be unregistered before return.
>
> In nsim_fib_exit(), unregister_fib_notifier should be called before
> nsim_fib_net_ops be unregistered, otherwise may cause use-after-free:
>
> BUG: KASAN: use-after-free in nsim_fib_event_nb+0x342/0x570 [netdevsim]
> Read of size 8 at addr ffff8881daaf4388 by task kworker/0:3/3499
>

> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 59c84b9fcf42 ("netdevsim: Restore per-network namespace accounting for fib entries")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>

\
 
 \ /
  Last update: 2019-10-13 00:33    [W:0.032 / U:9.512 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site