Skip to content
DoS Disclosed report Intermediate

Health check errors silently dropped when channel buffer full

When KMS operations fail, the plugin sends the error to a fixed-size buffered channel using a non-blocking send, and errors are silently discarded once that buffer is full. Under sustained KMS failure the health check state can become stale, so the health endpoint may report healthy while KMS is actually down.

misop00p Follow

Originally disclosed on HackerOne

Informational View original
  • Disclosed after 16 days

Component: pkg/plugin/plugin.go:153-156, pkg/plugin/plugin_v2.go:156-158 Affected Version: aws-encryption-provider @ 4341c70 (all versions) Found by: Source audit TLP: TLP:Amber


Summary

When KMS operations fail, the error is sent to a buffered channel (healthCheckErrc, size 100) via a non-blocking send. When the buffer is full, errors are silently dropped. Under sustained KMS failure, the health check goroutine's error state becomes stale, and /healthz may report healthy when KMS is actually down.


Vulnerable Code

Go
// pkg/plugin/plugin.go:152-156 (also plugin_v2.go:155-159)
if err != nil {
    select {
    case p.healthCheck.healthCheckErrc <- err:
    default:
        // ERROR SILENTLY DROPPED
    }

The channel is created with a fixed buffer:

Go
// pkg/plugin/shared_health_check.go:34
healthCheckErrc: make(chan error, errcBufSize),  // errcBufSize = 100

Root Cause

The non-blocking send pattern is intentional — it prevents Encrypt/Decrypt from blocking when the error channel is full. However, the silent drop means the SharedHealthCheck.Start() goroutine (which reads from this channel and calls RecordErr) may miss recent errors. If errors arrive faster than the goroutine consumes them (which happens under sustained failure), health state becomes stale.

Suggested Fix

Replace channel-based error propagation with direct RecordErr calls (already used in Health() method), or log when errors are dropped:

Go
select {
case p.healthCheck.healthCheckErrc <- err:
default:
    p.healthCheck.RecordErr(err) // update state directly when channel full
}

Platform

All platforms. Source audit finding.

Impact

Impact

  • Under sustained KMS failure (>100 errors queued), new errors are dropped
  • Health check timestamp (lastTs) isn't updated from dropped errors
  • /healthz reports stale status, potentially masking ongoing outages
  • Kubernetes may not detect the provider is non-functional
  • The existing TestHealthManyRequests test verifies non-blocking behavior but doesn't verify state correctness after drops

The original report as published on HackerOne, by misop00p. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The non-blocking send to a fixed-size error channel discards errors when the buffer is full, so the health-check goroutine never records them and its state goes stale.

Impact

Under sustained KMS failure the health endpoint could report a stale healthy status, potentially masking an ongoing outage and preventing Kubernetes from detecting that the provider is non-functional.

What the attacker needed

Sustained KMS failure; more than 100 errors queued

The fix

Error propagation should be changed to call the record-error method directly (as the Health method already does), or at least log errors when the channel is full.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

The program keeps a small queue of recent error messages so a background checker can read them. If the queue fills up, new errors are thrown away without any warning, so the checker keeps believing everything is fine. That means a monitoring page can say the service is healthy even though the thing it depends on has stopped working.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by misop00p

View all

4 more disclosed reports, best first.

More from AWS VDP

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.