Skip to content

Segfault in GrpcHealthCheckerImpl

Moderate
mattklein123 published GHSA-m4j9-86g3-8f49 Jun 9, 2022

Package

Envoy (Envoy)

Affected versions

< 1.22.1

Patched versions

1.22.1

Description

Attack type

Remote

Impact

Denial of service

Affected component(s)

gRPC health checking

Attack vector(s)

Remote, upstream hosts

Discoverer(s)/Credits

Erik Lindblad [email protected]

Description (brief; included in CVE)

An attacker-controlled upstream server that is health checked using gRPC health checking can crash Envoy via a null pointer dereference in certain circumstances.

Example exploit or proof-of-concept

  1. Attacker controls an upstream server that is health checked using gRPC
  2. Server is known to Envoy via service discovery (EDS, DNS, etc.)
  3. Envoy is configured to not remove upstream hosts until health check fails
  4. Attacker causes Envoy to mark the host for removal (remove from DNS, remove from EDS via some out of band mechanism, etc.)
  5. Attacker causes the upstream host to fail the gRPC health check.
  6. Envoy will crash.

Description (full; not included in CVE but will be published on GitHub later and linked)

Envoy can perform various types of upstream health checking. One of them uses gRPC. Envoy also has a feature which can “hold” (prevent removal) upstream hosts obtained via service discovery until configured active health checking fails.

If an attacker controls an upstream host and also controls service discovery of that host (via DNS, the EDS API, etc.), an attacker can crash Envoy by forcing removal of the host from service discovery, and then failing the gRPC health check request. This will crash Envoy via a null pointer dereference.

Mitigation

Disable gRPC health checking and/or replace it with a different health checking type.

Detection

Crashes with call stacks in the gRPC health checking code.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

CVE ID

CVE-2022-29224

Weaknesses

No CWEs