]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_rbtree: ignore inactive matching element with no descendants
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 1 Aug 2016 11:13:08 +0000 (13:13 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 8 Aug 2016 09:27:37 +0000 (11:27 +0200)
commit526b97837386f07fb861411b925e2399f6c277a9
tree4ffbd5227f627403d89a2aa67b832d50802462f3
parent1973a5d7fdafbf0b032e4a9227c62c384bad3f4d
netfilter: nft_rbtree: ignore inactive matching element with no descendants

If we find a matching element that is inactive with no descendants, we
jump to the found label, then crash because of nul-dereference on the
left branch.

Fix this by checking that the element is active and not an interval end
and skipping the logic that only applies to the tree iteration.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Tested-by: Anders K. Pedersen <akp@akp.dk>
net/netfilter/nft_rbtree.c