openvswitch: fix potential out of bound access in parse_ct
authorLiping Zhang <zlpnobody@gmail.com>
Sun, 23 Jul 2017 09:52:23 +0000 (17:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Jul 2017 23:25:06 +0000 (16:25 -0700)
commit69ec932e364b1ba9c3a2085fe96b76c8a3f71e7c
tree4adb13e0bebc06b4c9040ffa15ebc9421ca615a7
parent9476d393667968b4a02afbe9d35a3558482b943e
openvswitch: fix potential out of bound access in parse_ct

Before the 'type' is validated, we shouldn't use it to fetch the
ovs_ct_attr_lens's minlen and maxlen, else, out of bound access
may happen.

Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action")
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/conntrack.c