]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: add __nft_chain_type_get()
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 21 Jan 2020 15:07:00 +0000 (16:07 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 24 Jan 2020 19:54:28 +0000 (20:54 +0100)
commite2e7fc01babbd0cf5b872c11a5d6ee027053bd34
tree22dcb670215ae5c943d1fcd2ba8780bb1dbca885
parent030c1afd44e34ef7747b2953a48770142824e367
netfilter: nf_tables: add __nft_chain_type_get()

This new helper function validates that unknown family and chain type
coming from userspace do not trigger an out-of-bound array access. Bail
out in case __nft_chain_type_get() returns NULL from
nft_chain_parse_hook().

Fixes: 09db70f21fee ("netfilter: nf_tables: convert built-in tables/chains to chain types")
Reported-by: syzbot+156a04714799b1d480bc@syzkaller.appspotmail.com
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c