]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: compare sernum when walking fib for /proc/net/ipv6_route as safety net
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Sat, 21 Sep 2013 14:56:10 +0000 (16:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Sep 2013 21:32:17 +0000 (17:32 -0400)
commit945b0fa26917c6c3ca9c9a55c553fa330d8322ae
tree7a6690e9cf93deb539b25dd006f11e555c3ae3a6
parent65f95f9d2c0091538985ebd9224f9d9c53fc0dbb
ipv6: compare sernum when walking fib for /proc/net/ipv6_route as safety net

This patch provides an additional safety net against NULL
pointer dereferences while walking the fib trie for the new
/proc/net/ipv6_route walkers. I never needed it myself and am unsure
if it is needed at all, but the same checks where introduced in
cc52a2de5b03b2308d3847658f0c74a5bcf22873 ("ipv6: fib: fix crash when
changing large fib while dumping it") to fix NULL pointer bugs.

This patch is separated from the first patch to make it easier to revert
if we are sure we can drop this logic.

Cc: Ben Greear <greearb@candelatech.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_fib.c