]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
openvswitch: fix send of uninitialized stack memory in ct limit reply
authorIlya Maximets <i.maximets@ovn.org>
Sun, 4 Apr 2021 17:50:31 +0000 (19:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:47:22 +0000 (08:47 +0200)
commite93c80d4bdc8f4b80317b88b13f6945788b2ff67
treef0671abeae6866e9059acd3f6a0a80a82c449e98
parentba0e8db170c301b73aa71eb4585218f3105cea0a
openvswitch: fix send of uninitialized stack memory in ct limit reply

[ Upstream commit 4d51419d49930be2701c2633ae271b350397c3ca ]

'struct ovs_zone_limit' has more members than initialized in
ovs_ct_limit_get_default_limit().  The rest of the memory is a random
kernel stack content that ends up being sent to userspace.

Fix that by using designated initializer that will clear all
non-specified fields.

Fixes: 11efd5cb04a1 ("openvswitch: Support conntrack zone limit")
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/openvswitch/conntrack.c