]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Apr 2021 19:54:42 +0000 (12:54 -0700)
commit768cd3f37a84667cbcc608850bfccebc8e271e55
tree01b8e5a39e983f67f5fbc68dadcd8b1c2fc5e49b
parent41cdbb022b5fab3cbd4a64263cf4c1db095cdcbe
openvswitch: fix send of uninitialized stack memory in ct limit reply

'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: 37a6f9df29d7 ("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>
net/openvswitch/conntrack.c