]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
openvswitch: Use kmalloc_size_roundup() to match ksize() usage
authorKees Cook <keescook@chromium.org>
Tue, 18 Oct 2022 09:06:33 +0000 (02:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:31:49 +0000 (14:31 +0200)
commit23721bbf1481b153d91030f971cd5dbceead64b2
treef3e668159842da3fd4c37d9a40d9b2102064c69d
parentb6be0f6878416623b2c786f5b76937a47bce2ea0
openvswitch: Use kmalloc_size_roundup() to match ksize() usage

[ Upstream commit ab3f7828c9793a5dfa99a54dc19ae3491c38bfa3 ]

Round up allocations with kmalloc_size_roundup() so that openvswitch's
use of ksize() is always accurate and no special handling of the memory
is needed by KASAN, UBSAN_BOUNDS, nor FORTIFY_SOURCE.

Cc: Pravin B Shelar <pshelar@ovn.org>
Cc: dev@openvswitch.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20221018090628.never.537-kees@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: a1e64addf3ff ("net: openvswitch: remove misbehaving actions length check")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/openvswitch/flow_netlink.c