CVE-2016-6504
Description
epan/dissectors/packet-ncp2222.inc in the NDS dissector in Wireshark 1.12.x before 1.12.13 does not properly maintain a ptvc data structure, which allows remote attackers to cause a denial of service (NULL pointer dereference and application crash) via a crafted packet.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
Wireshark 1.12.0 < 1.12.12 - NDS Dissector Denial of Service
Sample generated with AFL
Build Information:
TShark 1.12.9 (v1.12.9-0-gfadb421 from (HEAD)
Copyright 1998-2015 Gerald Combs <gerald@wireshark.org> 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.48.1, with libpcap, with libz 1.2.8, with POSIX
capabilities (Linux), with libnl 3, without SMI, with c-ares 1.11.0, without
Lua, without Python, with GnuTLS 3.4.13, with Gcrypt 1.7.1, with MIT Kerberos,
with GeoIP.
Running on Linux 4.6.2-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.8.0 (tags/RELEASE_380/final).
--
This issue was uncovered with AFL (http://lcamtuf.coredump.cx/afl/)
There is a bug in dissect_nds_request located in epan/dissectors/packet-ncp2222.inc.
dissect_nds_request attempts to call ptvcursor_free() near packet-ncp2222.inc:11806 using the variable ptvc that is set to null at the start of dissect_nds_request. Using the attached sample, the only place ptvc could be set (~ncp2222.inc:11618) is never executed and thus ptvc remains a null pointer.
Credit goes to Chris Benedict, Aurelien Delaitre, NIST SAMATE Project, https://samate.nist.gov
Proof of Concept:
https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/40194.zip
OS impact
SUSE Affected 1 release
| Version | Status | Fixed in |
|---|---|---|
| โ | Affected | โ |
Debian Fixed 5 releases
| Version | Status | Fixed in |
|---|---|---|
| trixie | Fixed | 2.0 |
| sid | Fixed | 2.0 |
| forky | Fixed | 2.0 |
| bullseye | Fixed | 2.0 |
| bookworm | Fixed | 2.0 |
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| wireshark | wireshark | 1.12.0 | |
| wireshark | wireshark | 1.12.1 | |
| wireshark | wireshark | 1.12.2 | |
| wireshark | wireshark | 1.12.3 | |
| wireshark | wireshark | 1.12.4 | |
| wireshark | wireshark | 1.12.5 | |
| wireshark | wireshark | 1.12.6 | |
| wireshark | wireshark | 1.12.7 | |
| wireshark | wireshark | 1.12.8 | |
| wireshark | wireshark | 1.12.9 | |
| wireshark | wireshark | 1.12.10 | |
| wireshark | wireshark | 1.12.11 | |
| wireshark | wireshark | 1.12.12 | |
References
- http://openwall.com/lists/oss-security/2016/07/28/3
- http://www.debian.org/security/2016/dsa-3648
- http://www.securityfocus.com/bid/92164
- http://www.securitytracker.com/id/1036480
- http://www.wireshark.org/security/wnpa-sec-2016-40.html
- https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=12576
- https://code.wireshark.org/review/gitweb?p=wireshark.git%3Ba=commit%3Bh=9eacbb4d48df647648127b9258f9e5aeeb0c7d99
- https://www.exploit-db.com/exploits/40194/
- https://www.suse.com/security/cve/CVE-2016-6504.html
- https://security-tracker.debian.org/tracker/CVE-2016-6504
CWEs
CWE-476
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.