CVE-2020-24336

9.8 CRITICAL

📋 TL;DR

This vulnerability allows remote attackers to execute arbitrary code or cause denial of service via buffer overflow in Contiki and Contiki-NG operating systems when NAT64 is enabled. The bug occurs when parsing DNS responses without proper length validation, affecting devices running these IoT/embedded operating systems.

💻 Affected Systems

Products:
  • Contiki
  • Contiki-NG
Versions: Contiki through 3.0, Contiki-NG through 4.5
Operating Systems: Contiki OS, Contiki-NG OS
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when NAT64 functionality is enabled in the configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, device takeover, and potential lateral movement in IoT networks.

🟠

Likely Case

Denial of service causing device crashes and network disruption in IoT environments.

🟢

If Mitigated

Limited impact if NAT64 is disabled or network segmentation isolates vulnerable devices.

🌐 Internet-Facing: HIGH - Devices with NAT64 enabled and exposed to untrusted networks are directly vulnerable to remote exploitation.
🏢 Internal Only: MEDIUM - Internal IoT devices with NAT64 enabled remain vulnerable to internal attackers or compromised devices.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending malicious DNS responses to vulnerable devices with NAT64 enabled.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Contiki-NG 4.6 and later, Contiki patches available in security updates

Vendor Advisory: https://us-cert.cisa.gov/ics/advisories/icsa-20-343-01

Restart Required: Yes

Instructions:

1. Update to Contiki-NG 4.6 or later. 2. Apply security patches for Contiki 3.0. 3. Recompile and redeploy firmware. 4. Restart affected devices.

🔧 Temporary Workarounds

Disable NAT64

all

Disable NAT64 functionality in Contiki/Contiki-NG configuration

Modify project-conf.h: #define UIP_CONF_IPV6 0
Or disable NAT64 in build configuration

Network Segmentation

all

Isolate devices with NAT64 enabled from untrusted networks

🧯 If You Can't Patch

  • Disable NAT64 functionality in all device configurations
  • Implement strict network filtering to block malicious DNS responses to affected devices

🔍 How to Verify

Check if Vulnerable:

Check if NAT64 is enabled and version is Contiki ≤3.0 or Contiki-NG ≤4.5

Check Version:

Check firmware version in device logs or via administrative interface

Verify Fix Applied:

Verify version is Contiki-NG ≥4.6 or patched Contiki version, and check that address length validation exists in ip64-dns64.c

📡 Detection & Monitoring

Log Indicators:

  • Device crashes
  • Memory corruption errors
  • DNS parsing failures

Network Indicators:

  • Malformed DNS responses targeting NAT64 devices
  • Unusual traffic to/from IoT devices on port 53

SIEM Query:

source="iot-device" AND (event="crash" OR event="buffer_overflow")

🔗 References

📤 Share & Export