summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-04-06 08:26:52 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2019-04-15 07:31:50 +0200
commit33d1c018179d0a30c39cc5f1682b77867282694b (patch)
tree72c0d98f9a56f6ec1aa8d47d3ca311baa018b4f4 /tools
parent3c79107631db1f7fd32cf3f7368e4672004a3010 (diff)
netfilter: nf_tables: prevent shift wrap in nft_chain_parse_hook()
I believe that "hook->num" can be up to UINT_MAX. Shifting more than 31 bits would is undefined in C but in practice it would lead to shift wrapping. That would lead to an array overflow in nf_tables_addchain(): ops->hook = hook.type->hooks[ops->hooknum]; Fixes: fe19c04ca137 ("netfilter: nf_tables: remove nhooks field from struct nft_af_info") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions