HTTP/3: allocate insert buffer from connection pool

Previously, it was allocated from the encoder stream pool.  This could
lead to use-after-free if the stream was closed and another encoder
stream was opened.

Reported by Trung Nguyen (@everping) of CyStack.
This commit is contained in:
Roman Arutyunyan
2026-06-17 07:40:35 -07:00
committed by Roman Arutyunyan
parent 875750a4f7
commit ceccdbd2ee
+1 -1
View File
@@ -168,7 +168,7 @@ ngx_http_v3_get_insert_buffer(ngx_connection_t *c)
if (dt->insert_buffer == NULL) {
h3scf = ngx_http_v3_get_module_srv_conf(c, ngx_http_v3_module);
dt->insert_buffer = ngx_create_temp_buf(c->pool,
dt->insert_buffer = ngx_create_temp_buf(c->quic->parent->pool,
h3scf->max_table_capacity);
if (dt->insert_buffer == NULL) {
return NULL;