]> www.infradead.org Git - users/jedix/linux-maple.git/commit
netfilter: Use kmemdup_array instead of kmemdup for multiple allocation
authorYan Zhen <yanzhen@vivo.com>
Mon, 26 Aug 2024 03:41:36 +0000 (11:41 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 3 Sep 2024 08:47:16 +0000 (10:47 +0200)
commit20eb5e7cb78c331107fbdf2f77a30fbea9338638
treec9c5e91d7af09fa0663cce4b85595b93f64c7d4d
parent4a1d3acd6ea86075e77fcc1188c3fc372833ba73
netfilter: Use kmemdup_array instead of kmemdup for multiple allocation

When we are allocating an array, using kmemdup_array() to take care about
multiplication and possible overflows.

Also it makes auditing the code easier.

Signed-off-by: Yan Zhen <yanzhen@vivo.com>
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/netfilter/ebtables.c
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c
net/netfilter/nf_nat_core.c