Public bug reported:

[Impact]

The security update for CVE-2026-58055 makes nghttpx (nghttp2-proxy) stall
CONNECT tunnels when the client sends tunnel data before the backend has
answered CONNECT with 200.

Affected versions (all tested on amd64):
  jammy    1.43.0-1ubuntu0.4
  noble    1.59.0-1ubuntu0.4
  resolute 1.68.0-2ubuntu0.2

Not affected:
  jammy 1.43.0-1ubuntu0.3, noble 1.59.0-1build4, resolute 1.68.0-2
  upstream ab28105c (the commit that was backported), v1.71.0, master

Clients that send the first payload right behind an HTTP/2 CONNECT request
(for example Xray's HTTP outbound) hang until they time out. Clients that
wait for the 200 before sending are not affected.

[Cause]

debian/patches/CVE-2026-58055.patch backports upstream commit
ab28105c4a0197da24f8bfc414bc116055249e1e ("nghttpx: Tighten up CONNECT and
HTTP Upgrade handling"). The backport adds two members without an
initializer:

  src/shrpx_http_downstream_connection.h:
    bool blocked_request_buf_processed_;
  src/shrpx_downstream.h (struct Request):
    bool http1_msg_complete;

Upstream declares them as `bool blocked_request_buf_processed_{};` and
`bool http1_msg_complete{};`. The older branches do not use default member
initializers everywhere, so the `{}` was dropped and nothing sets the
members in the constructors.

Request data that arrives before the backend's 200 is kept in the blocked
request buffer and is flushed by
HttpDownstreamConnection::process_blocked_request_buf_on_response(), which
returns early when blocked_request_buf_processed_ is true. With an
indeterminate initial value the flush is skipped and the data is never
forwarded.

Because the value depends on what was in the allocation before, the failure
is intermittent: sequential requests fail almost every time, concurrent
ones fail less often.

[Test Case]

1. Run nghttpx as an HTTP/2 proxy in front of any HTTP/1.1 CONNECT
proxy:

     frontend=0.0.0.0,18443
     backend=127.0.0.1,10080
     private-key-file=/tmp/key.pem
     certificate-file=/tmp/cert.pem
     http2-proxy=yes

2. Over one TLS connection negotiated as h2, send a CONNECT request and
   write the tunnel payload (e.g. "GET / HTTP/1.1\r\nHost: ...\r\n\r\n")
   immediately, without waiting for the response headers.

3. Expected: the payload reaches the target and its response comes back.
   Actual: the 200 for CONNECT arrives, but the payload is never forwarded
   and the stream hangs.

The attached earlydata/main.go does this end to end: it starts its own
CONNECT backend and HTTP target, then runs 40 attempts per scenario
against nghttpx on 127.0.0.1:18443.

  payload after 200, new connection each    40/40 ok
  payload before 200, new connection each    1/40 FAIL
  payload before 200, one connection        38/40 FAIL

With the attached patch applied all three scenarios pass 40/40.

[Fix]

Initialize both members, as upstream does. Patches for jammy and noble are
attached; the same two-line change applies to resolute.

[Regression Potential]

The change only gives two bool members a defined initial value (false),
which is what the upstream code relies on. No behaviour changes for
requests that were already handled correctly.

** Affects: nghttp2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: jammy noble regression-update

** Patch added: "polary-init-connect-flags.patch"
   
https://bugs.launchpad.net/bugs/2175561/+attachment/6020292/+files/polary-init-connect-flags.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2175561

Title:
  nghttpx stalls CONNECT tunnels after CVE-2026-58055 update
  (uninitialized blocked_request_buf_processed_)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nghttp2/+bug/2175561/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to