]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_rbtree: fix data handling of end interval elements
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 6 Feb 2014 15:15:39 +0000 (16:15 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 7 Feb 2014 13:22:06 +0000 (14:22 +0100)
commit31460ca2bf4d955c036e5922d18305ad9d442d26
treed546b5942af2d99c7e0f6482f8994f737ed6cb37
parentf6991b1196ef0e27693e42346523b9db89801dc1
netfilter: nft_rbtree: fix data handling of end interval elements

This patch fixes several things which related to the handling of
end interval elements:

* Chain use underflow with intervals and map: If you add a rule
  using intervals+map that introduces a loop, the error path of the
  rbtree set decrements the chain refcount for each side of the
  interval, leading to a chain use counter underflow.

* Don't copy the data part of the end interval element since, this
  area is uninitialized and this confuses the loop detection code.

* Don't allocate room for the data part of end interval elements
  since this is unused.

So, after this patch the idea is that end interval elements don't
have a data part.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nft_rbtree.c