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

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

Build:
DEFAULT BRANCH: main
Ran 10 Jun 2023 08:19PM UTC
Files 42
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

10 Jun 2023 07:51PM UTC coverage: 89.815% (-0.002%) from 89.817%
5231662144.4

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

6270 of 6981 relevant lines covered (89.82%)

2034.83 hits per line

Source Files on job unit-ngx_1.25.0-v8-ssl-debug-no_hup - 5231662144.4
  • Tree
  • List 0
  • Changed 23
  • Source Changed 0
  • Coverage Changed 23
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 5231662144
  • b0de09b7 on github
  • Prev Job for on main (#5225407998.5)
  • 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