Re: [PATCH] fib_trie: potential out of bounds access in trie_show_stats()

2013-07-24 Thread David Miller
From: Hannes Frederic Sowa Date: Wed, 24 Jul 2013 17:00:00 +0200 > On Mon, Jul 22, 2013 at 12:01:58PM -0700, Jerry Snitselaar wrote: >> 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 i

Re: [PATCH] fib_trie: potential out of bounds access in trie_show_stats()

2013-07-24 Thread Hannes Frederic Sowa
On Mon, Jul 22, 2013 at 12:01:58PM -0700, Jerry Snitselaar wrote: > 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[]. >

[PATCH] fib_trie: potential out of bounds access in trie_show_stats()

2013-07-22 Thread Jerry Snitselaar
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 --- net/ipv4/fib_trie.c | 2 +- 1 file c