Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openresty/lua-nginx-module
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master@{1day}
Choose a base ref
...
head repository: openresty/lua-nginx-module
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Nov 24, 2026

  1. bugfix: a QUIC connection could be drained and freed under ssl_client…

    …_hello_by_lua* and ssl_certificate_by_lua*.
    
    ngx_quic_new_connection() puts a new QUIC connection on the reusable
    queue before its handshake.  Once free connections drop to
    worker_connections / 16, the ngx_get_connection() call that
    ssl_client_hello_by_lua* and ssl_certificate_by_lua* make for their fake
    connection runs ngx_drain_connections().  When the handshaking
    connection is the only reusable one, it is closed and freed right there,
    its SSL object included, and its slot comes back zeroed as the fake
    connection: the handler then dereferences a NULL c->ssl and the worker
    segfaults.  A connection the Lua code asks for after a yield, a cosocket
    say, drains it the same way, and the abort cleanup then frees the Lua
    thread that is still running.
    
    TCP is not affected because nginx takes a connection off the reusable
    queue before its TLS handshake; this module kept its own guard only for
    nginx < 1.17.9, which predates QUIC.
    
    Keep the connection off the reusable queue for as long as the handler
    runs, as ngx_quic_create_stream() does around its own
    ngx_get_connection() call, and put it back when the handler returns, or
    in the done callback once a yielded handler finishes.  A TCP connection
    is never reusable at this point, so nothing changes for it, debug log
    included.
    
    ssl_session_fetch_by_lua* and ssl_session_store_by_lua* never run on a
    QUIC connection: they skip TLS 1.3, the only version QUIC uses.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    2 people authored and zhuizhuhaomeng committed Nov 24, 2026
    Configuration menu
    Copy the full SHA
    fc90cf4 View commit details
    Browse the repository at this point in the history
  2. tests: skip t/199-ssl-quic-drain-connections.t with BoringSSL.

    ssl_client_hello_by_lua* is not available with BoringSSL, so nginx
    failed to start and Test::Nginx bailed out of the whole run.  Skip the
    file there, as t/166-ssl-client-hello.t does; t/139-ssl-cert-by.t skips
    its QUIC tests with BoringSSL too.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    2 people authored and zhuizhuhaomeng committed Nov 24, 2026
    Configuration menu
    Copy the full SHA
    f6fe351 View commit details
    Browse the repository at this point in the history
Loading