• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Kong / ngx_wasm_module / 5231662144
95%

Build:
DEFAULT BRANCH: main
Ran 10 Jun 2023 08:03PM UTC
Jobs 7
Files 46
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
5231662144

push

github

thibaultcha
fix(proxy-wasm) handle internal redirects with and without filter chains

During internal redirects Nginx clears the request context which in our
case holds `rctx`. Leveraged by Kong Gateway to handle a category of
HTTP errors, reproduced in LuaJIT FFI tests.

The `r->pool` cleanup will be invoked for any number of attached
`rctxs`, which in the case of internal redirects can be more than one
(since auto-created by `ngx_http_wasm_ctx`). In this case, `r` contains
the newer `rctx`, which is then used in both handlers and causes a
use-after-free (or free-after-free attempt).

Instead, we do not override this function's `rctx` variable since it was
already given via `data`, which in this branch comes from the pool
cleanup trigger, and will be distinct for each pool cleanup handler run.
Multiple `rctxs` can be cleaned up when their associated `r->pool` is
freed. This also correctly frees both filter chains (attached to each
`rctx`).

6634 of 7384 relevant lines covered (89.84%)

12853.63 hits per line

Jobs
ID Job ID Ran Files Coverage
1 unit-ngx_1.25.0-wasmer-no_ssl-no_debug-no_hup - 5231662144.1 10 Jun 2023 08:03PM UTC 0
88.27
GitHub Action Run
2 unit-ngx_1.25.0-wasmer-ssl-no_debug-no_hup - 5231662144.2 10 Jun 2023 08:04PM UTC 0
88.76
GitHub Action Run
3 unit-ngx_1.25.0-wasmer-ssl-debug-no_hup - 5231662144.3 10 Jun 2023 08:04PM UTC 0
89.42
GitHub Action Run
4 unit-ngx_1.25.0-v8-ssl-debug-no_hup - 5231662144.4 10 Jun 2023 08:10PM UTC 0
89.82
GitHub Action Run
5 unit-openresty_1.21.4.1-wasmtime-ssl-debug-no_hup - 5231662144.5 10 Jun 2023 08:16PM UTC 0
90.11
GitHub Action Run
6 unit-ngx_1.21.6-wasmer-ssl-debug-no_hup - 5231662144.6 10 Jun 2023 08:04PM UTC 0
89.4
GitHub Action Run
7 unit-ngx_1.25.0-wasmtime-ssl-debug-hup - 5231662144.7 10 Jun 2023 08:19PM UTC 0
88.99
GitHub Action Run
Source Files on build 5231662144
Detailed source file information is not available for this build.
  • Back to Repo
  • b0de09b7 on github
  • Prev Build on main (#5225407998)
  • Next Build on main (#5232280158)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc