summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-04-06 07:26:52 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-04-15 07:31:50 +0200
commit33d1c018179d0a30c39cc5f1682b77867282694b (patch)
tree72c0d98f9a56f6ec1aa8d47d3ca311baa018b4f4 /tools/testing
parentnetfilter: ctnetlink: don't use conntrack/expect object addresses as id (diff)
downloadlinux-33d1c018179d0a30c39cc5f1682b77867282694b.tar.xz
linux-33d1c018179d0a30c39cc5f1682b77867282694b.zip
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/testing')
0 files changed, 0 insertions, 0 deletions