]> git.baikalelectronics.ru Git - kernel.git/commit
fib_trie: potential out of bounds access in trie_show_stats()
authorJerry Snitselaar <jerry.snitselaar@oracle.com>
Mon, 22 Jul 2013 19:01:58 +0000 (12:01 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jul 2013 23:05:14 +0000 (16:05 -0700)
commit9ae4c8810234c21e83c775ba7d29d7521e192a66
tree6a1eb3ded2655de5b3cee3107ebae7eedbbd3309
parentf8685780bcdf55e2a566b4be3d25ed773fa8e8f4
fib_trie: potential out of bounds access in trie_show_stats()

With the <= max condition in the for loop, it will be always go 1
element further than needed. If the condition for the while loop is
never met, then max is MAX_STAT_DEPTH, and for loop will walk off the
end of nodesizes[].

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_trie.c