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

Kong / ngx_wasm_module / 5231662144 / 1
95%
main: 95%

Build:
DEFAULT BRANCH: main
Ran 10 Jun 2023 08:19PM UTC
Files 41
Run time 3s
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

10 Jun 2023 07:51PM UTC coverage: 88.273% (+0.03%) from 88.245%
5231662144.1

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`).

5894 of 6677 relevant lines covered (88.27%)

1689.33 hits per line

Source Files on job unit-ngx_1.25.0-wasmer-no_ssl-no_debug-no_hup - 5231662144.1
  • Tree
  • List 0
  • Changed 16
  • Source Changed 0
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 5231662144
  • b0de09b7 on github
  • Prev Job for on main (#5225407998.7)
  • Next Job for on main (#5232280158.1)
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