]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: fix a use-after-free in mtype_destroy()
authorCong Wang <xiyou.wangcong@gmail.com>
Fri, 10 Jan 2020 19:53:08 +0000 (11:53 -0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 13 Jan 2020 17:53:59 +0000 (18:53 +0100)
commitab4451b0c441bfaa9e8304399207371e8580cc3c
tree383269c98a778495978a7e56e69962040e4cf600
parent33b70fa0ec3b327b70be9de09667dc90c5d60444
netfilter: fix a use-after-free in mtype_destroy()

map->members is freed by ip_set_free() right before using it in
mtype_ext_cleanup() again. So we just have to move it down.

Reported-by: syzbot+4c3cc6dbe7259dbf9054@syzkaller.appspotmail.com
Fixes: 4bc6f97344e2 ("netfilter: ipset: Support extensions which need a per data destroy function")
Acked-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipset/ip_set_bitmap_gen.h