wireshark/wireshark-0010-cve-2025-13499.patch

39 lines
1.2 KiB
Diff

From 49137f8ce93c9f7ac55b69c8e089ba6a422f633e Mon Sep 17 00:00:00 2001
From: Darius Davis <darius-wireshark@free-range.com.au>
Date: Sat, 25 Oct 2025 15:01:34 +1000
Subject: [PATCH] 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
---
epan/dissectors/packet-kafka.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/epan/dissectors/packet-kafka.c b/epan/dissectors/packet-kafka.c
index cc2a0eee392..764b79446d5 100644
--- a/epan/dissectors/packet-kafka.c
+++ b/epan/dissectors/packet-kafka.c
@@ -1950,6 +1950,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 {
@@ -1959,9 +1960,9 @@ decompress_snappy(tvbuff_t *tvb, packet_info *pinfo, int offset, uint32_t length
goto end;
}
*decompressed_offset = 0;
+ ret = true;
}
- ret = true;
end:
if (composite_tvb) {
tvb_composite_finalize(composite_tvb);
--
GitLab