-
Notifications
You must be signed in to change notification settings - Fork 284
Closed
Description
nginx version: openresty/1.15.8.1rc0
built by gcc 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
built with OpenSSL 1.1.0j 20 Nov 2018
TLS SNI support enabled
I am experiencing random segfaults when passing invalid data to base64url (and base64 in general seems)
This seems to be caused by a race condition of some sorts, since adding some debugging in ngx.base64
sometimes makes the problem disappear.
Minimal test to reproduce:
local u64d = require "ngx.base64".decode_base64url
for i=1,1000 do
local x = u64d(("x"):rep(i))
end$ resty segfault.lua ; echo $?
0
$ resty segfault.lua ; echo $?
139
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels