CVE-2026-56117: dhcpcd Heap Use-After-Free in Control Socket (MEDIUM 4.7)
dhcpcd, a widely deployed DHCP client daemon, contains a memory safety bug that can crash the service when privilege separation is disabled. A local user on the same system can exploit this by sending a specially crafted command to dhcpcd's control socket, causing the daemon to reference memory it has already freed. While the vulnerability requires local access and a specific configuration, it represents a denial-of-service risk in environments where dhcpcd runs with privilege separation turned off—a configuration sometimes found in embedded systems or minimal deployments.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 4.7 MEDIUM · CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-416
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-23 / 2026-07-14
NVD description (verbatim)
dhcpcd through 10.3.2, fixed in commit 78ea09e, contains a heap use-after-free vulnerability in the control socket handling within src/control.c that allows local unprivileged attackers to trigger memory corruption when privilege separation is disabled. Attackers can connect to the control socket and send a privileged command such as -x, causing control_recvdata() to free the client object while the same READ+HANGUP event subsequently reaches control_hangup() with the stale pointer, resulting in a use-after-free condition exploitable in deployments using --disable-privsep or where privsep initialization has failed with the control socket operating in mode 0666.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in src/control.c's socket handling logic. When dhcpcd processes a privileged command (such as -x) via the control socket, the control_recvdata() function frees a client object. However, a subsequent READ+HANGUP event on the same socket reaches control_hangup() with a stale pointer to the now-freed memory, creating a use-after-free condition (CWE-416). This occurs specifically when privilege separation (privsep) is disabled via the --disable-privsep flag or when privsep initialization fails, leaving the control socket with world-readable permissions (mode 0666). The flaw was fixed in commit 78ea09e.
Business impact
In affected deployments, an unprivileged local user can repeatedly crash dhcpcd, disrupting network configuration and renewal. This is most critical in headless or embedded systems that depend on dhcpcd for persistent network connectivity and lack alternative DHCP mechanisms. Organizations using dhcpcd in containers, VMs, or minimal Linux distributions with privsep disabled should treat this as a service availability concern, though exploitation requires prior local system access.
Affected systems
dhcpcd versions through 10.3.2 are vulnerable when configured with --disable-privsep or when privsep initialization fails. The risk is highest on systems where untrusted local users exist or where the system hosts multi-tenant workloads. Standard desktop and server deployments with privilege separation enabled are not affected. Embedded systems, lightweight distributions, and custom builds that explicitly disable privsep or run dhcpcd in restricted containers face the greatest exposure.
Exploitability
Exploitation requires local system access and the ability to connect to dhcpcd's control socket. The technical bar is low—a local user simply sends a privileged command to trigger the memory corruption. No authentication is required if the control socket is world-readable (mode 0666), which occurs when privsep is disabled. The vulnerability is not remotely exploitable. CVSS score 4.7 (Medium) reflects local access requirement and high impact (denial of service) balanced against the specific configuration prerequisite.
Remediation
Update dhcpcd to a patched version incorporating commit 78ea09e or later. Verify against the vendor's advisory for the specific release number. As an interim mitigation, ensure privilege separation is enabled (the default) and verify the control socket permissions are restrictive. Review system configurations to eliminate unnecessary --disable-privsep flags. Monitor for any systems running dhcpcd in environments where local user access cannot be fully controlled.
Patch guidance
Apply the dhcpcd update that includes the fix from commit 78ea09e. Verify the patched version with your package manager or vendor release notes. After patching, confirm that privilege separation is enabled and the control socket has appropriate file permissions (not world-readable). Test DHCP renewal and dynamic reconfiguration to ensure the patch does not introduce regressions in your environment.
Detection guidance
Monitor system logs for unexpected dhcpcd crashes or restarts, particularly on systems with untrusted local users. Watch for repeated connection attempts to the dhcpcd control socket (typically /var/run/dhcpcd/control or similar, depending on configuration). File integrity monitoring on the dhcpcd binary and configuration files can alert to unauthorized changes. Check running processes to confirm privilege separation status: if privsep is disabled, the risk surface is active.
Why prioritize this
Although the CVSS score is Medium (4.7), prioritization depends on your deployment model. Prioritize patching if you run dhcpcd with --disable-privsep in production, host untrusted local users, or rely on dhcpcd for critical network services. Standard privileged-separation-enabled deployments can address this in a regular patch cycle. The lack of KEV designation and remote exploitability indicates this is not an imminent widespread threat, but denial-of-service impact in specific configurations warrants prompt attention.
Risk score, explained
CVSS 4.7 (Medium) is assigned under CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H. The score reflects: local attack vector (AV:L), high attack complexity due to the --disable-privsep configuration requirement (AC:H), low privilege requirement (PR:L; any local user can trigger it), no user interaction needed (UI:N), impact limited to availability/denial of service (A:H, no confidentiality or integrity impact), and no scope change (S:U). The Medium rating is appropriate for a local DoS with a configuration prerequisite.
Frequently asked questions
Does this vulnerability affect default dhcpcd installations?
No. The default configuration enables privilege separation, which eliminates the vulnerability. You are affected only if you explicitly disabled privilege separation using --disable-privsep or if privsep initialization has failed. Check your system configuration and dhcpcd startup flags.
Can this vulnerability be exploited remotely?
No. This is strictly a local vulnerability requiring direct access to the system and the ability to connect to dhcpcd's control socket. Remote attackers cannot exploit it without first gaining local system access.
What happens if dhcpcd crashes due to this vulnerability?
dhcpcd will crash and stop processing DHCP requests. This disrupts network configuration and lease renewal. Depending on your system's service management (systemd, runit, etc.), dhcpcd may restart automatically, but each crash briefly interrupts network availability.
Is there a workaround if I cannot patch immediately?
Enable privilege separation (remove --disable-privsep from your configuration and restart dhcpcd) or restrict access to the control socket by checking file permissions and removing world-readable access. These mitigations reduce the attack surface while you prepare to patch.
This analysis is derived from published CVE data and vendor disclosures. Patch version numbers and specific remediation details should be verified against the official dhcpcd project advisory and your distributor's security guidance. Testing patches in non-production environments before deployment is strongly recommended. SEC.co makes no warranty regarding the accuracy or completeness of this analysis and disclaims liability for actions taken based on this information. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-56113MEDIUMdhcpcd Heap Use-After-Free Denial of Service
- CVE-2025-55644MEDIUMHeap Use-After-Free in GPAC MP4Box v2.4 DoS Vulnerability
- CVE-2025-55650MEDIUMHeap Use-After-Free in GPAC MP4Box v2.4 DoS Vulnerability
- CVE-2025-60486MEDIUMHeap Use-After-Free in GPAC MP4Box MPEG-2 Dasher – DoS Vulnerability
- CVE-2026-10232MEDIUMAssimp Use-After-Free in ASE Parser (CVSS 5.3)
- CVE-2026-10634MEDIUMZephyr TCP Stack Use-After-Free Race Condition
- CVE-2026-10635MEDIUMXtensa Memory Domain Use-After-Free in Zephyr RTOS
- CVE-2026-10637MEDIUMZephyr IPv6 MLD Use-After-Free Denial of Service