net: openvswitch: fix skb leak on flow key update failure during recirculation
authorIlya Maximets <i.maximets@ovn.org>
Mon, 27 Jul 2026 18:18:30 +0000 (20:18 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Jul 2026 00:42:33 +0000 (17:42 -0700)
commite1cf066244dad576221b7123a0e5005967f25a20
tree4e24a0c051744b5ef38283d51da394fd2da2c9f4
parentb041ed62aa6e3b2d7d36127e0e5d7bf2701f8231
net: openvswitch: fix skb leak on flow key update failure during recirculation

do_execute_actions() returns right away when execute_recirc() fails on
the last action as it assumes this function always takes ownership of
the skb when 'last' is true.  But when the flow key update fails, the
function doesn't free the skb and it ends up leaked.

This is a very unlikely scenario as it requires the packet to become
unparseable by applying a set of actions on a previously parseable skb,
but should be fixed nevertheless.

Reported by Sashiko.

Fixes: 971427f353f3 ("openvswitch: Add recirc and hash action.")
Cc: stable@vger.kernel.org
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Link: https://patch.msgid.link/20260727181851.306076-2-i.maximets@ovn.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/openvswitch/actions.c