Wireshark-bugs: [Wireshark-bugs] [Bug 12293] New: Stack overflow in dissect_ncp_request

Date: Fri, 25 Mar 2016 22:25:36 +0000
Bug ID 12293
Summary Stack overflow in dissect_ncp_request
Product Wireshark
Version 1.12.8
Hardware All
OS All
Status UNCONFIRMED
Severity Major
Priority Low
Component Dissection engine (libwireshark)
Assignee [email protected]
Reporter [email protected]

Created attachment 14446 [details]
Test case generated by AFL 1.96b

Build Information:
TShark 1.12.8 (v1.12.8-0-g5b6e543 from (HEAD)

Copyright 1998-2015 Gerald Combs <[email protected]> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with GLib 2.46.2, with libpcap, with libz 1.2.8, with POSIX
capabilities (Linux), with libnl 3, without SMI, with c-ares 1.10.0, without
Lua, without Python, with GnuTLS 3.4.9, with Gcrypt 1.6.5, with MIT Kerberos,
without GeoIP.

Running on Linux 4.4.5-1-ARCH, with locale en_US.utf8, with libpcap version
1.7.4, with libz 1.2.8.
       Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz

Built using clang 4.2.1 Compatible Clang 3.7.1 (tags/RELEASE_371/final).
--
There is a stack overflow bug in the dissect_ncp_request() function in
epan/dissectors/packet-ncp2222.inc

The stack is overwritten when uni_to_string() is used to copy a string from the
offending packet to a 1024 byte array declared on the stack.

Backtrace was corrupted by the stack overflow.

Valgrind output:

==19965== Memcheck, a memory error detector
==19965== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==19965== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==19965== Command: tshark -nxVr
03ad23183246a1923c6b6e4dcf11f3fc3ca37dd3ea189dd0c0642569e52dde29.pcap
==19965== 
==19965== Invalid read of size 8
==19965==    at 0x7016FAC: dissect_ncp_request (packet-ncp2222.inc:7737)
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==  Address 0x2e2e2e2e2e2e2e6e is not stack'd, malloc'd or (recently)
free'd
==19965== 
==19965== 
==19965== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==19965==  General Protection Fault
==19965==    at 0x7016FAC: dissect_ncp_request ()
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965==    by 0x2E2E2E2E2E2E2E2D: ???
==19965== 
==19965== HEAP SUMMARY:
==19965==     in use at exit: 28,068,059 bytes in 176,067 blocks
==19965==   total heap usage: 264,770 allocs, 88,703 frees, 41,100,783 bytes
allocated
==19965== 
==19965== LEAK SUMMARY:
==19965==    definitely lost: 16 bytes in 3 blocks
==19965==    indirectly lost: 0 bytes in 0 blocks
==19965==      possibly lost: 388 bytes in 20 blocks
==19965==    still reachable: 28,067,655 bytes in 176,044 blocks
==19965==         suppressed: 0 bytes in 0 blocks
==19965== Rerun with --leak-check=full to see details of leaked memory
==19965== 
==19965== For counts of detected and suppressed errors, rerun with: -v
==19965== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Credit goes to: Chris Benedict, Aurelien Delaitre, NIST SAMATE Project,
https://samate.nist.gov


You are receiving this mail because:
  • You are watching all bug changes.