]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nft_set_rbtree: handle element re-addition after deletion
authorPablo Neira Ayuso <pablo@netfilter.org>
Sat, 20 May 2017 22:37:10 +0000 (00:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 13:07:51 +0000 (15:07 +0200)
commit1a422e547a65c949a52074f830259f57ed665824
treec91479f0c50d6c4f170d25b522339ff6e743b8b3
parent6b183d1b84764e81dcb64f6b41151e79db23679c
netfilter: nft_set_rbtree: handle element re-addition after deletion

commit d2df92e98a34a5619dadd29c6291113c009181e7 upstream.

The existing code selects no next branch to be inspected when
re-inserting an inactive element into the rb-tree, looping endlessly.
This patch restricts the check for active elements to the EEXIST case
only.

Fixes: e701001e7cbe ("netfilter: nft_rbtree: allow adjacent intervals with dynamic updates")
Reported-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Tested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nft_set_rbtree.c