Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changes-entries/h2-proxy-link-map-off-by-one.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*) mod_proxy_http2: Reserve room for the terminating NUL when rewriting a
backend Link response header, fixing a one-byte stack overflow reachable
with a crafted Link header. [arshiya tabasum]
2 changes: 1 addition & 1 deletion modules/http2/h2_proxy_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ static void map_link(link_ctx *ctx)
* to work, we need to use the proxy uri */
int path_start = ctx->link_start + ctx->rbu_len;
link_len -= ctx->rbu_len;
need_len = ctx->psu_len + link_len;
need_len = ctx->psu_len + link_len + 1;
if (need_len > sizeof(buffer))
goto out;
memcpy(buffer, ctx->p_server_uri, ctx->psu_len);
Expand Down