Commit dccd9ecc authored by David S. Miller's avatar David S. Miller

ipv4: Do not use dead fib_info entries.

Due to RCU lookups and RCU based release, fib_info objects can
be found during lookup which have fi->fib_dead set.

We must ignore these entries, otherwise we risk dereferencing
the parts of the entry which are being torn down.
Reported-by: default avatarYevgen Pronenko <yevgen.pronenko@sonymobile.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0e0c5516
......@@ -1370,6 +1370,8 @@ static int check_leaf(struct fib_table *tb, struct trie *t, struct leaf *l,
if (fa->fa_tos && fa->fa_tos != flp->flowi4_tos)
continue;
if (fi->fib_dead)
continue;
if (fa->fa_info->fib_scope < flp->flowi4_scope)
continue;
fib_alias_accessed(fa);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment