]> git.feebdaed.xyz Git - 0xmirror/ovs.git/commitdiff
dpif-netlink: Fix potential leak of a malformed meters netlink reply.
authorIlya Maximets <i.maximets@ovn.org>
Thu, 30 Oct 2025 10:51:18 +0000 (11:51 +0100)
committerIlya Maximets <i.maximets@ovn.org>
Thu, 6 Nov 2025 21:56:46 +0000 (22:56 +0100)
If netlink transaction returns malformed or otherwise not parsable
reply, it should be freed, as callers will not do that on failure.

Found while reading the code.

Fixes: 80738e5f93a7 ("dpif-netlink: Add meter support.")
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
lib/dpif-netlink.c

index 2b33d0fa604f78b2bebb45a8e96d4c55ccffc56a..c327296eaee5dc397bdb85ed5ce4c14ffd914f7d 100644 (file)
@@ -4083,6 +4083,7 @@ dpif_netlink_meter_transact(struct ofpbuf *request, struct ofpbuf **replyp,
         static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
         VLOG_DBG_RL(&rl,
                     "Kernel module response to meter tranaction is invalid");
+        ofpbuf_delete(*replyp);
         return EINVAL;
     }
     return 0;