External risk intelligence

glibc clnt_create Stack Buffer Overflow leading to Potential Code Execution.

CVE advisorySeverity: CRITICAL (CVSS 9.8)

CVE-2022-23219

The vulnerability exists within glibc, a foundational library used by a vast array of applications. While the library itself is ubiquitous, the specific deprecated function (clnt_create) is not typically exposed directly to the internet in most common deployments. Reachability is highly dependent on the specific application implementation, making internet exposure possible but not a common or default deployment pattern.

Halo Surface Signal: 3 out of 5 — possibly public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A vulnerability in the GNU C Library could allow an attacker to cause a denial of service or potentially execute code on affected systems. This issue arises from a buffer overflow in a deprecated function that handles hostnames without proper length validation. The primary concern is confirming if this specific function is used within our environment, as its exposure is dependent on application implementation.

  • Flaw in core library may allow code execution.
  • Check if this specific deprecated function is used.
  • Confirm relevance and exposure for our systems.

Attack Path

How an attacker could exploit the issue

An attacker could target a system by sending a specially crafted hostname to the deprecated `clnt_create` function within the GNU C Library's sunrpc module. This function, which handles network connections, copies the hostname argument onto the stack without checking its size. If the hostname is too long, it can overflow the buffer, potentially allowing an attacker to execute arbitrary code or cause a denial of service.

  • No authentication or user interaction required.
  • Triggered by passing a long hostname.
  • Allows code execution or denial of service.

Live Threat

Current exploitation, exposure, and threat context

A buffer overflow in a deprecated GNU C Library function could allow an attacker to disrupt service or potentially execute arbitrary code. This could occur when the function's hostname argument is not properly validated, leading to memory corruption. The impact is dependent on whether applications using this function are compiled with stack protection.

  • System data may be corrupted.
  • Invalid hostname arguments could trigger overflow.
  • Service disruption or code execution may occur.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability in the GNU C Library's `clnt_create` function requires identifying which teams manage applications or systems utilizing this deprecated component. The initial step involves inventorying all deployments, verifying network exposure and business criticality, and then assigning ownership for remediation planning.

  • Confirm application and infrastructure ownership.
  • Verify direct network exposure and criticality.
  • Plan remediation based on risk assessment.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is the GNU C Library (glibc) and why is it important?

glibc is a foundational collection of code that acts as a bridge between computer applications and the Linux operating system. It provides essential services like memory management, network communication, and system calls. Because almost every program on a Linux system relies on glibc to function correctly, vulnerabilities within it can have a broad impact on the overall stability and security of the entire environment.

What does CWE-120 mean in the context of CVE-2022-23219?

CWE-120 refers to a classic software weakness known as a buffer copy without checking size. In this CVE, the deprecated `clnt_create` function blindly copies a hostname into a fixed-size memory area on the stack. Because the function does not verify how much data it is receiving, an overly long input can overwrite adjacent memory, leading to a crash or potential control over program execution.

How is this buffer overflow triggered?

An attacker triggers the vulnerability by sending an exceptionally long hostname to the `clnt_create` function. It is important to note that this bug is not triggered by standard network traffic or routine usage. It only occurs if an application specifically calls this deprecated function and passes an untrusted, malicious input that exceeds the expected memory limit.

Do I need to worry about this vulnerability?

Halo Surface Signal indicates this is a possible concern because glibc is ubiquitous, but the vulnerable function is rarely exposed to the internet by default. Your risk depends on whether your specific applications use the deprecated `clnt_create` function. You should verify if your software stack relies on this legacy component and determine if it handles external input.

When should I prioritize fixing this for my systems?

Begin by identifying which applications and services in your infrastructure actually use the vulnerable glibc library. Prioritize systems where the code is directly reachable over the network and performs high-value operations. Once you have an inventory, coordinate with the respective system owners to assess if updating the library or replacing the legacy function usage is the necessary next step.

References