diff options
| author | Roman Arutyunyan <arut@nginx.com> | 2026-01-28 20:38:38 +0400 |
|---|---|---|
| committer | Roman Arutyunyan <arutyunyan.roman@gmail.com> | 2026-02-04 21:22:23 +0400 |
| commit | 6df8054cb21b4e5e857b4489e623a79575c2ab8e (patch) | |
| tree | 5852e1f53159c0354c85093c03f09606d46b2ad3 /src/http/modules | |
| parent | 784fa05025cb8cd0c770f99bc79d2794b9f85b6e (diff) | |
| download | nginx-6df8054cb21b4e5e857b4489e623a79575c2ab8e.tar.gz nginx-6df8054cb21b4e5e857b4489e623a79575c2ab8e.tar.bz2 | |
Upstream: reinit upstream after reading bad response.
Previously, when connecting to a backend, if the read event handler was
called before the write event handler, and the received response triggered
a next upstream condition, then ngx_http_upstream_reinit() was not called
to clean up the old upstream context. This had multiple implications.
For all proxy modules, since the last upstream response was not cleaned up,
it was mixed with the next upstream response. This could result in ignoring
the second response status code, duplicate response headers or reporting
old upstream header errors.
With ngx_http_grpc_module and ngx_http_proxy_v2_module, ctx->connection
was left dangling since the object it referenced was allocated from the
last upstream connection pool, which was deleted when freeing last upstream.
This lead to use-after-free when trying to reuse this object for the next
upstream.
Diffstat (limited to 'src/http/modules')
0 files changed, 0 insertions, 0 deletions
