openresty / openresty/lua-nginx-module
May trigger coredump when ngx_http_set_builtin_multi_header and subrequest?
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
1 ngx_http_set_builtin_multi_header will destroy and reinit multi header array in the main request, but the header address is reserved in header variable of the subrequest
2 if ngx_array_destroy really release the memory and reuse by other logic, then subrequest access the headers may cause error

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing ngx_http_set_builtin_multi_header in the main request and how the subrequest retains the header address. Verify whether destroying and reinitializing the multi-header array can leave the subrequest accessing released memory; done means confirming the failure and documenting or testing the required safe behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100