Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2024-43167

CVE-2024-43167: Unbound NULL Pointer Dereference DoS Flaw

CVE-2024-43167 is a NULL pointer dereference flaw in Unbound that can cause denial of service through application crashes. This post covers the technical details, affected versions, security impact, and mitigation strategies.

Updated:

CVE-2024-43167 Overview

CVE-2024-43167 is a NULL pointer dereference vulnerability discovered in the ub_ctx_set_fwd function within Unbound, a popular validating, recursive, and caching DNS resolver. When certain API functions such as ub_ctx_set_fwd and ub_ctx_resolvconf are called in a specific sequence, the program attempts to read from a NULL pointer, leading to a segmentation fault and application crash. This vulnerability can result in a denial of service condition by causing the application to terminate unexpectedly.

Dispute Notice

This issue is disputed by NLnet Labs, the original software developer, who claims it falls within the expected functionality and security controls of the application. Red Hat has made a claim that there is a security risk within Red Hat products. Organizations using Red Hat distributions should refer to Red Hat documentation or support channels for guidance.

Affected Products

  • Unbound DNS Resolver (versions with vulnerable ub_ctx_set_fwd implementation)
  • Red Hat products utilizing Unbound (per Red Hat's security advisory)
  • Debian-based systems running affected Unbound packages

Discovery Timeline

  • August 12, 2024 - CVE-2024-43167 published to NVD
  • November 3, 2025 - Last updated in NVD database

Technical Details for CVE-2024-43167

Vulnerability Analysis

This vulnerability stems from a NULL pointer dereference (CWE-476) in the Unbound DNS resolver library. The flaw specifically affects the ub_ctx_set_fwd function, which is used to configure forwarding servers in the Unbound context. When this function is called in combination with ub_ctx_resolvconf in a particular order without proper initialization, the application attempts to dereference a NULL pointer, resulting in a segmentation fault.

The vulnerability requires local access to exploit, as an attacker must be able to invoke specific sequences of API calls against the Unbound library. This significantly limits the attack surface, as remote exploitation is not directly possible without additional vectors.

Root Cause

The root cause of CVE-2024-43167 lies in inadequate NULL pointer validation within the ub_ctx_set_fwd function. When API functions are invoked in an unexpected sequence, internal data structures may not be properly initialized, leaving pointers in a NULL state. The function fails to verify pointer validity before dereferencing, causing the segmentation fault when the NULL pointer is accessed.

It's worth noting that NLnet Labs disputes the security implications of this behavior, stating it falls within expected functionality and security controls of the application. However, Red Hat maintains that the issue poses a security risk within their product ecosystem.

Attack Vector

The attack vector for this vulnerability is local, requiring the attacker to have the ability to make API calls to the Unbound library. Exploitation involves calling the ub_ctx_set_fwd and ub_ctx_resolvconf functions in a specific sequence that triggers the NULL pointer dereference condition.

The vulnerability mechanism involves improper API call sequencing that leads to uninitialized pointer access. For detailed technical analysis, refer to the GitHub Unbound Issue #1072 and the associated Pull Request #1073 which contains the proposed fix.

Detection Methods for CVE-2024-43167

Indicators of Compromise

  • Unexpected segmentation faults in Unbound DNS resolver processes
  • Core dump files indicating NULL pointer access in ub_ctx_set_fwd or related functions
  • Application logs showing sudden termination of DNS resolver services

Detection Strategies

  • Monitor system logs for segmentation fault signals (SIGSEGV) originating from Unbound processes
  • Implement process monitoring to detect unexpected Unbound service restarts or crashes
  • Review application crash dumps for stack traces indicating NULL pointer dereference in libunbound API functions

Monitoring Recommendations

  • Configure process monitoring alerts for Unbound service availability
  • Enable core dump collection to capture crash diagnostics for forensic analysis
  • Monitor DNS resolution latency spikes that may indicate service interruptions

How to Mitigate CVE-2024-43167

Immediate Actions Required

  • Review your environment to determine if Unbound DNS resolver is deployed
  • Consult vendor-specific advisories from Red Hat and Debian for distribution-specific patches
  • Assess whether your applications invoke the affected API functions (ub_ctx_set_fwd, ub_ctx_resolvconf)
  • Implement process restart mechanisms to minimize denial of service impact

Patch Information

Organizations should consult their distribution's security advisories for available patches. The GitHub Pull Request #1073 contains the proposed code changes to address the NULL pointer handling. Red Hat customers should reference Bug Report #2303456 for Red Hat-specific guidance.

Additional security information is available through the Openwall OSS Security Announcement.

Workarounds

  • Ensure proper API call ordering when using libunbound functions programmatically
  • Implement defensive coding practices with NULL checks when integrating with the Unbound library
  • Configure process supervisors (systemd, supervisord) to automatically restart Unbound services in case of crashes
bash
# Example systemd configuration for automatic service restart
# Add to /etc/systemd/system/unbound.service.d/restart.conf
[Service]
Restart=always
RestartSec=5

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.