John Jean

Chercheur en sécurité informatique. Fondateur de Wargan.

John Jean

Security researcher. Founder of Wargan.

pound <= 4.23: unauthenticated remote DoS via Connection header parsing

cve
pending
written
2026-10-09
released
2026-10-29
risk
medium
affected
pound 4.17 through 4.23
type
heap over-read (size_t underflow) in the list-valued header parser
status
fixed in pound 4.24 (2026-10-29)

[0] Application

From github.com/graygnuorg/pound:
« Light-weight reverse proxy, load balancer and HTTPS front-end for Web servers. »

It is written in C and usually sits at the internet-facing edge, in front of web farms. Version 4.17 introduced a new list-valued header parser (commit ac5a2e4, “Provide a unified interface for accessing list headers”, 2025-05-21: field_string_len / field_segment_len / field_list_filter, src/http.c) that rewrites and re-parses quoted strings in header values. Versions 4.17 through 4.23 are affected. 4.16, which predates the parser, is not.

This flaw was verified on a stock build of the v4.23 release tarball (default autotools, gcc -O2, no sanitizer) on a standard Linux host, from the position of an anonymous network client, with the minimal ListenHTTP config and with a production-like config (Service + answering backend). In both cases each malicious request crashed the process (rates measured in D).

pound 4.24, released on 2026/10/29, fixes the flaw with the first change proposed in [II]. A CVE number has been requested and will be added here when assigned.

[I] The vulnerability

A) Overview

A single HTTP request whose Connection header ends in an unpaired quote (the simplest form, the exact condition is given in B) crashes the serving process. Any anonymous client can send it, and each delivered request kills the process with all its in-flight connections. The built-in supervisor respawns a fresh child within milliseconds, so a single request is barely noticed. One request per second, indefinitely, kills every long-lived connection of every concurrent user: measured on a live instance, 100% of 10-second requests failed at an attack rate of one request per second.

B) Required data

Nothing beyond network access to the listener and one crafted header. The trigger is:

printf 'GET / HTTP/1.1\r\nHost: x\r\nConnection: keep-alive, x"\r\n\r\n' \
    | nc <host> <port>

A differential test narrows down the trigger: the crash requires at least one byte consumed before a quote within the list element. Values ending in an unpaired quote are the simplest form. Elements such as ab"c or x"a" also trigger it, because the buggy re-scan from the segment start re-finds a quote and overshoots. An element whose quote is its first byte (", "a", "ab) is harmless: the scanner starts past it and never re-finds it.

C) Explanation

When it meets a quote, the new list parser measures the quoted string from the start of the element instead of from the quote. field_segment_len calls (src/http.c:2772, v4.23):

size_t
field_segment_len (char const *fstr, size_t flen)
{
  size_t i;
  for (i = 0; i < flen; )
    {
      if (fstr[i] == ',')
	break;
      else if (fstr[i] == '"')
	i += field_string_len (fstr, flen);   /* <-- whole flen, not flen - i */
      else
	i++;
    }
  return i;
}

For a value ending in an unpaired ", field_string_len re-finds that quote at the last position and returns flen, a length counted from the element start that the caller adds to an index already past the bytes before the quote, so the segment length returned by field_segment_len exceeds the bytes that remain. Its consumer then advances past the end of the buffer (src/http.c:2817-2818):

	  hval += n;
	  hlen -= n;      /* n > hlen on the triggering input */

With n > hlen this is an unsigned size_t underflow: hlen becomes ~SIZE_MAX, and the next loop iteration scans forward off the end of the heap-allocated header value until it faults on the first unmapped page. The Connection header reaches this code through cs_locate_token (src/http.c:2850, called at src/http.c:6363), which runs on every request before any service selection, so no CombineHeaders configuration is needed.

On the test host, each crafted request produced one kernel-logged fault:

[212344.274029] pound[1014789]: segfault at 7f9f54021000 ip ... error 4 \
    in pound[...] likely on CPU 2
[212370.738961] pound[1014804]: segfault at 7f9f54021000 ... likely on CPU 3
[212370.823892] pound[1014812]: segfault at 7f9f50021000 ... likely on CPU 0

(page-aligned fault addresses, error 4 = user-mode read fault on an unmapped page, the scan walking off the heap). The same request sent through an Accept header (the CombineHeaders path, mvh.inc included) is caught by AddressSanitizer: heap-buffer-overflow READ of size 1 in c_memspn (src/cctype.c:205) called from field_list_filter (src/http.c:2805), one byte past a 22-byte region (Accept: text/html, x" plus its NUL) strdup’d by http_header_alloc (src/http.c:2934).

The vulnerable parser does not exist in 4.16 (the previous combination logic was stringbuf-based). It was introduced by commit ac5a2e4 (“Provide a unified interface for accessing list headers”, 2025-05-21), first released in 4.17. The affected range is therefore 4.17 through 4.23 (confirmed absent in 4.16 and present in 4.23).

D) Exploitation

Measured on a stock -O2 build with a production-like configuration (one listener, one Service, one answering backend), under two attack rates, one and ten requests per second, with the crashes counted in the supervisor’s log (one child terminated on signal 11 per death):

[control, no attack]          slow(10s) 10/10 ok  | crashes   0
[attack,  13 req at  1 req/s]  slow(10s)  0/10 ok  | crashes  11
[attack, 130 req at 10 req/s]  slow(10s)  0/10 ok  | crashes 130
[control, 5 req, no load]                          | crashes   5

“slow” = ten concurrent 10-second requests, the kind of traffic a reverse proxy carries all day (downloads, uploads, websockets, media streams…). At one malicious request per second, every one of them failed, and the backend simultaneously logged broken pipes as the proxy died mid-response. In a first run, short requests failed at 1% (1 req/s) and 10% (10 req/s): only those whose connection landed in a crash window. Each delivered request kills the process: 130 crashes for 130 requests at ten per second, five for five in isolation. At one per second, two of the thirteen requests produced no crash, most likely sent while the child was being replaced. The kernel’s own segfault log under-counts under load (30 lines for 130 crashes, printk rate limiting), which is why the supervisor’s log is the counter used here.

We looked for an information disclosure (groomed heap, over-read bytes forwarded to the backend or the client) and could not build one. The two consumers of the post-underflow loop rule it out for different reasons. On the CombineHeaders path, the consumer (compose_header_add, src/http.c:3761, called at 3871 and 3899) does copy out-of-bounds bytes into a composed header, but returns 0 unconditionally: the loop can only end in the fault, and the child dies before the composed header is ever forwarded. On the Connection path (the one demonstrated above), the consumer is the token matcher (field_token_casecmp, src/http.c:2843): it can terminate the loop early (if an out-of-bounds byte sequence happens to spell close), but it copies and forwards nothing, and the request simply continues with conn_closed set. Either way, no out-of-bounds byte reaches another socket: no confidentiality or integrity impact was found, and a heap-grooming experiment on a live instance (canary credentials sprayed into the session table, five rounds of crashes) captured zero canaries at the backend.

E) Consequences

Any anonymous client can cut every long-lived connection of every user (websockets, uploads, downloads, streams…) by sending one small request per second, for as long as it keeps sending.

Pound’s built-in supervisor (default daemonized configuration) respawns the child immediately, with no restart counter and no backoff. The service is degraded but stays up: short requests keep being served between two crashes. Deployments without the supervisor (-F or Daemon 0, common in containers, or Supervisor 0) lose the process on the first request and depend on the container’s restart policy.

In-memory state is lost with each child: session tables (sticky sessions are reassigned) and backend health state. On the TLS side, the session-ID cache lives in the child and is lost, but the SSL context is created in the parent before the supervisor fork, so ticket-based resumption (the client default, and the only mechanism in TLS 1.3) still works after a crash.

The service comes back as soon as the attacker stops, with no operator intervention. It is an active DoS, below a persistent one (a crash that needs manual cleanup), with no confidentiality or integrity impact, hence the medium rating.

[II] Mitigation

1. Pass the remaining length to the quoted-string scanner (src/http.c:2772), a one-line fix:

--- a/src/http.c
+++ b/src/http.c
@@ -2769,7 +2769,7 @@
       if (fstr[i] == ',')
 	break;
       else if (fstr[i] == '"')
-	i += field_string_len (fstr, flen);
+	i += field_string_len (fstr + i, flen - i);
       else
 	i++;
     }

The scan is then bounded by the bytes that remain, and the underflow cannot occur. A standalone regression test (the three functions extracted from the source, run under AddressSanitizer) is available on request: it fails on 4.23 and passes with the fix.

2. Clamp the segment length in field_list_filter against the remaining hlen, so that a wrong length from the scanner can no longer underflow it.

3. Add a backoff to the supervisor. It currently respawns the child immediately and forever, so a sustained attack turns into a permanent fork loop. Until then, operators can run pound under an external supervisor with a reviewed restart policy.

[III] Timeline

2026/10/09: Advisory sent to the pound maintainer
2026/10/13: Fix committed upstream, with credit in the THANKS file
2026/10/29: pound 4.24 released with the fix
2026/12/02: This page updated and opened to search engines, CVE requested

[IV] Author

John JEAN is a French security researcher, CTO at Wargan (https://www.wargan.com).
Follow me on X @johnjean

[V] PGP

My current PGP key is 0xDC3CB82BF0967AF0, you can get it on the Work with me page.