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 erili@spotify.com

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
5.9
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
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