CVE-2021-39921
📋 TL;DR
A NULL pointer dereference vulnerability in Wireshark's Modbus dissector allows attackers to cause denial of service via specially crafted Modbus packets or capture files. This affects Wireshark users analyzing Modbus traffic or opening malicious capture files. The vulnerability can crash Wireshark but does not allow arbitrary code execution.
💻 Affected Systems
- Wireshark
📦 What is this software?
Fedora by Fedoraproject
Fedora by Fedoraproject
Wireshark by Wireshark
Wireshark by Wireshark
⚠️ Risk & Real-World Impact
Worst Case
Wireshark crashes when processing malicious Modbus traffic, disrupting network analysis and monitoring operations. In continuous monitoring scenarios, this could cause extended service disruption.
Likely Case
Wireshark crashes when opening a malicious capture file or analyzing network traffic containing crafted Modbus packets, requiring restart of the application.
If Mitigated
With proper network segmentation and access controls, only authorized users can inject packets, reducing attack surface. Updated Wireshark versions are immune.
🎯 Exploit Status
Exploitation requires network access to inject packets or ability to provide malicious capture files. The vulnerability details and proof-of-concept are publicly available in the GitLab issue.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Wireshark 3.4.10 and 3.2.18
Vendor Advisory: https://www.wireshark.org/security/wnpa-sec-2021-14.html
Restart Required: Yes
Instructions:
1. Download latest Wireshark from wireshark.org. 2. Uninstall current version. 3. Install updated version. 4. Restart system or at least restart Wireshark.
🔧 Temporary Workarounds
Disable Modbus dissector
allTemporarily disable the vulnerable Modbus protocol dissector in Wireshark
Edit -> Preferences -> Protocols -> Modbus -> Uncheck 'Enable Modbus protocol'
Network segmentation
allIsolate Modbus traffic to trusted networks only
🧯 If You Can't Patch
- Restrict Wireshark usage to trusted personnel only
- Avoid analyzing untrusted capture files or Modbus network traffic
🔍 How to Verify
Check if Vulnerable:
Check Wireshark version: Help -> About Wireshark. If version is between 3.4.0-3.4.9 or 3.2.0-3.2.17, system is vulnerable.
Check Version:
wireshark --version
Verify Fix Applied:
Verify Wireshark version is 3.4.10+ or 3.2.18+. Test by analyzing known malicious Modbus capture files - application should not crash.
📡 Detection & Monitoring
Log Indicators:
- Wireshark crash logs
- Application error logs showing NULL pointer exceptions
Network Indicators:
- Unusual Modbus traffic patterns
- Malformed Modbus packets
SIEM Query:
source="wireshark.log" AND ("crash" OR "segmentation fault" OR "null pointer")
🔗 References
- https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-39921.json
- https://gitlab.com/wireshark/wireshark/-/issues/17703
- https://lists.debian.org/debian-lts-announce/2021/12/msg00015.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/A6AJFIYIHS3TYDD2EBYBJ5KKE52X34BJ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YEWTIRMC2MFQBZ2O5M4CJHJM4JPBHLXH/
- https://security.gentoo.org/glsa/202210-04
- https://www.debian.org/security/2021/dsa-5019
- https://www.wireshark.org/security/wnpa-sec-2021-14.html
- https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-39921.json
- https://gitlab.com/wireshark/wireshark/-/issues/17703
- https://lists.debian.org/debian-lts-announce/2021/12/msg00015.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/A6AJFIYIHS3TYDD2EBYBJ5KKE52X34BJ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YEWTIRMC2MFQBZ2O5M4CJHJM4JPBHLXH/
- https://security.gentoo.org/glsa/202210-04
- https://www.debian.org/security/2021/dsa-5019
- https://www.wireshark.org/security/wnpa-sec-2021-14.html