Files
linux-stable-mirror/net/netfilter
Pablo Neira AyusoandGreg Kroah-Hartman a965f7f0ea netfilter: conntrack: clamp maximum hashtable size to INT_MAX
[ Upstream commit b541ba7d1f ]

Use INT_MAX as maximum size for the conntrack hashtable. Otherwise, it
is possible to hit WARN_ON_ONCE in __kvmalloc_node_noprof() when
resizing hashtable because __GFP_NOWARN is unset. See:

  0708a0afe2 ("mm: Consider __GFP_NOWARN flag for oversized kvmalloc() calls")

Note: hashtable resize is only possible from init_netns.

Fixes: 9cc1c73ad6 ("netfilter: conntrack: avoid integer overflow when resizing")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-01 18:22:19 +01:00
..
2023-06-21 15:45:38 +02:00