Wireshark-bugs: [Wireshark-bugs] [Bug 11188] New: Logcat heap overflow
Date: Tue, 12 May 2015 16:40:10 +0000
Bug ID | 11188 |
---|---|
Summary | Logcat heap overflow |
Product | Wireshark |
Version | 1.12.4 |
Hardware | All |
OS | All |
Status | UNCONFIRMED |
Severity | Critical |
Priority | Low |
Component | Dissection engine (libwireshark) |
Assignee | bugzilla-admin@wireshark.org |
Reporter | gerald@wireshark.org |
Created attachment 13604 [details]
Capture demonstrating the issue
Build Information:
Paste the COMPLETE build information from "Help->About Wireshark", "wireshark
-v", or "tshark -v".
--
Hanno Böck discovered a heap overflow in wiretap/logcat.c:
----
Attached is a malformed pcap file that will trigger a read heap
overflow in wireshark.
Test with tshark -r [file] and valgrind or address sanitizer.
I've attached the output of address sanitizer to give an idea what's
happening.
This was found with the help of the tool american fuzzy lop.
----
Running as user "root" and group "root". This could be dangerous.
=================================================================
==2587==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6030000a6a34
at pc 0x7f147316ad70 bp 0x7fff9971dc40 sp 0x7fff9971dc10
READ of size 4 at 0x6030000a6a34 thread T0
#0 0x7f147316ad6f in strlen
(/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/libasan.so.1+0x32d6f)
#1 0x7f1472d757e3 in detect_version
/mnt/ram/wireshark-1.12.4/wiretap/logcat.c:150
#2 0x7f1472d757e3 in logcat_open
/mnt/ram/wireshark-1.12.4/wiretap/logcat.c:252
#3 0x7f1472d280b3 in wtap_open_offline
/mnt/ram/wireshark-1.12.4/wiretap/file_access.c:1011
#4 0x44d7a9 in cf_open /mnt/ram/wireshark-1.12.4/tshark.c:4064
#5 0x416429 in main /mnt/ram/wireshark-1.12.4/tshark.c:2101
#6 0x7f1463b65f9f in __libc_start_main (/lib64/libc.so.6+0x1ff9f)
#7 0x41cb65 (/mnt/ram/wire/tshark+0x41cb65)
0x6030000a6a34 is located 0 bytes to the right of 20-byte region
[0x6030000a6a20,0x6030000a6a34)
allocated by thread T0 here:
#0 0x7f147318f6f7 in malloc
(/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/libasan.so.1+0x576f7)
#1 0x7f14648a3469 in g_malloc (/usr/lib64/libglib-2.0.so.0+0x4f469)
#2 0x2033c086face5dff
SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 strlen
Shadow bytes around the buggy address:
0x0c068000ccf0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c068000cd00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c068000cd10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c068000cd20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c068000cd30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c068000cd40: fa fa fa fa 00 00[04]fa fa fa fd fd fd fa fa fa
0x0c068000cd50: fd fd fd fa fa fa 00 00 00 00 fa fa 00 00 00 00
0x0c068000cd60: fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa 00 00
0x0c068000cd70: 00 00 fa fa 00 00 01 fa fa fa 00 00 00 00 fa fa
0x0c068000cd80: 00 00 00 00 fa fa 00 00 00 00 fa fa 00 00 00 00
0x0c068000cd90: fa fa 00 00 00 00 fa fa 00 00 00 01 fa fa 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Contiguous container OOB:fc
ASan internal: fe
==2587==ABORTING
You are receiving this mail because:
- You are watching all bug changes.
- Follow-Ups:
- [Wireshark-bugs] [Bug 11188] Logcat heap overflow
- From: bugzilla-daemon
- [Wireshark-bugs] [Bug 11188] Logcat heap overflow
- Prev by Date: [Wireshark-bugs] [Bug 10640] wireshark 1.12.1 crashes on startup on Mac OS X 10.10 (Yosemite)
- Next by Date: [Wireshark-bugs] [Bug 11188] Logcat heap overflow
- Previous by thread: [Wireshark-bugs] [Bug 10640] wireshark 1.12.1 crashes on startup on Mac OS X 10.10 (Yosemite)
- Next by thread: [Wireshark-bugs] [Bug 11188] Logcat heap overflow
- Index(es):