From cdc0394392e353e494d84fec4a13f61ed93410fa Mon Sep 17 00:00:00 2001
From: John Thacker <johnthacker@gmail.com>
Date: Sun, 12 Apr 2026 07:18:11 -0400
Subject: [PATCH] Openflow v6: Add a length check for OFPBPT_TIME

Add a length zero similar to the other types.

Fix #21181

AI-Assisted: no


(cherry picked from commit c8b105293591f7f38944c0f00fd7dd848b4f7ff0)

Co-authored-by: John Thacker <johnthacker@gmail.com>
---
 epan/dissectors/packet-openflow_v6.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/epan/dissectors/packet-openflow_v6.c b/epan/dissectors/packet-openflow_v6.c
index 4738a69ca73..118a1b31736 100644
--- a/epan/dissectors/packet-openflow_v6.c
+++ b/epan/dissectors/packet-openflow_v6.c
@@ -6398,6 +6398,11 @@ dissect_openflow_bundle_prop_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
 
     switch (prop_type) {
     case OFPBPT_TIME:
+        if (prop_len <= 4) {
+            expert_add_info(pinfo, prop_item, &ei_openflow_v6_length_too_short);
+            offset = length;
+            break;
+        }
         dissect_openflow_time_v6(tvb, pinfo, tree, offset, length);
         offset += prop_len - 4;
         break;
-- 
GitLab

