CVE-2020-7461

7.3 HIGH

📋 TL;DR

A heap overflow vulnerability in FreeBSD's dhclient allows remote attackers to potentially execute arbitrary code by sending malformed DHCP option 119 packets. This affects FreeBSD systems running vulnerable versions of dhclient, which typically runs with reduced privileges in a sandbox, limiting the impact. Systems using DHCP for network configuration are at risk.

💻 Affected Systems

Products:
  • FreeBSD dhclient
Versions: FreeBSD 12.1-STABLE before r365010, 11.4-STABLE before r365011, 12.1-RELEASE before p9, 11.4-RELEASE before p3, 11.3-RELEASE before p13
Operating Systems: FreeBSD
Default Config Vulnerable: ⚠️ Yes
Notes: Systems using DHCP client (dhclient) for network configuration are vulnerable. Static IP configurations are not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to privilege escalation, network compromise, or persistence on affected systems, though sandboxing reduces impact.

🟠

Likely Case

Denial of service (dhclient crash) causing network connectivity loss until dhclient restarts or system reboots.

🟢

If Mitigated

Limited impact due to Capsicum sandbox and reduced privileges, potentially only denial of service.

🌐 Internet-Facing: MEDIUM - DHCP typically listens on local network, but could be exposed via misconfigurations or VPNs.
🏢 Internal Only: MEDIUM - Internal attackers could exploit via local network access to DHCP traffic.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires sending malformed DHCP packets to the vulnerable dhclient. The Capsicum sandbox makes reliable exploitation more difficult.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: FreeBSD 12.1-STABLE r365010+, 11.4-STABLE r365011+, 12.1-RELEASE p9+, 11.4-RELEASE p3+, 11.3-RELEASE p13+

Vendor Advisory: https://security.FreeBSD.org/advisories/FreeBSD-SA-20:26.dhclient.asc

Restart Required: Yes

Instructions:

1. Update FreeBSD system using 'freebsd-update fetch' and 'freebsd-update install'. 2. Rebuild dhclient from ports if using custom build. 3. Restart network services or reboot system.

🔧 Temporary Workarounds

Disable DHCP client

freebsd

Configure system with static IP addresses instead of using DHCP

Edit /etc/rc.conf to set ifconfig_<interface>="inet <static_ip> netmask <netmask>"
Restart networking: /etc/rc.d/netif restart

Use alternative DHCP client

freebsd

Replace vulnerable dhclient with alternative DHCP client implementation

Install dhcpcd or other DHCP client from ports/pkg
Configure to use alternative client in /etc/rc.conf

🧯 If You Can't Patch

  • Isolate affected systems on separate VLANs with strict network segmentation
  • Implement DHCP snooping on network switches to filter malicious DHCP packets

🔍 How to Verify

Check if Vulnerable:

Check FreeBSD version with 'uname -a' and compare against affected versions. Check if dhclient is running with 'ps aux | grep dhclient'.

Check Version:

uname -a

Verify Fix Applied:

Verify FreeBSD version is patched with 'uname -a'. Check dhclient binary version if custom built.

📡 Detection & Monitoring

Log Indicators:

  • dhclient crashes or abnormal termination in system logs
  • Network connectivity loss events coinciding with DHCP traffic

Network Indicators:

  • Malformed DHCP packets with option 119 in network traffic
  • Unusual DHCP traffic patterns from untrusted sources

SIEM Query:

source="system_logs" dhclient AND (crash OR error OR terminated)

🔗 References

📤 Share & Export