File wireshark-0106-CVE-2025-13499.patch of Package wireshark.41978

commit e180152d3dae668249f78c72a55a4ba436b57af7
Author: Darius Davis <darius-wireshark@free-range.com.au>
Date:   Sat Oct 25 15:01:34 2025 +1000

    Kafka: Fix decompress_snappy with no xerial chunks.
    
    Instead of returning true without setting outputs, report a failure to
    decompress and return false to the caller.
    
    Fix #20823
    
    (cherry picked from commit 49137f8ce93c9f7ac55b69c8e089ba6a422f633e)

diff --git a/epan/dissectors/packet-kafka.c b/epan/dissectors/packet-kafka.c
index 2b6b179fb2..bc23feae65 100644
--- a/epan/dissectors/packet-kafka.c
+++ b/epan/dissectors/packet-kafka.c
@@ -1909,6 +1909,7 @@ decompress_snappy(tvbuff_t *tvb, packet_info *pinfo, int offset, uint32_t length
             count++;
             DISSECTOR_ASSERT_HINT(count < MAX_LOOP_ITERATIONS, "MAX_LOOP_ITERATIONS exceeded");
         }
+        ret = composite_tvb != NULL;
 
     } else {
 
@@ -1918,9 +1919,9 @@ decompress_snappy(tvbuff_t *tvb, packet_info *pinfo, int offset, uint32_t length
 
         *decompressed_tvb = tvb_new_child_real_data(tvb, decompressed_buffer, (guint)out_size, (gint)out_size);
         *decompressed_offset = 0;
+        ret = TRUE;
 
     }
-    ret = TRUE;
 end:
     if (composite_tvb) {
         tvb_composite_finalize(composite_tvb);
openSUSE Build Service is sponsored by