Giter Club home page Giter Club logo

Comments (5)

Zash avatar Zash commented on July 24, 2024

Could this be the same thing, but though a different path?

#0  0x00005568a670cb3b in luaS_newlstr (L=L@entry=0x5568a8401c30, str=str@entry=0x7fafc6de4021 "SSL:Verify:Registry", l=19) at lstring.c:82
        o = <optimized out>
        h = 1821639967
        step = 1
        l1 = 0
#1  0x00005568a6703dec in lua_getfield (L=L@entry=0x5568a8401c30, idx=idx@entry=-10000, k=k@entry=0x7fafc6de4021 "SSL:Verify:Registry") at lapi.c:550
        i_o = 0x7ffd49fbc450
        t = 0x5568000000a4
        key = {
          value = {
            gc = 0x0,
            p = 0x0,
            n = 0,
            b = 0
          },
          tt = 1
        }
#2  0x00007fafc6de2ab0 in cert_verify_cb (x509_ctx=0x5568a92ebaf0, ptr=0x5568a8bfbc20) at src/context.c:225
        verify = <optimized out>
        L = 0x5568a8401c30
        ctx = 0x5568a8bfbc20
        pctx = <optimized out>
#3  0x00007fafc6b962ee in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
No symbol table info available.
#4  0x00007fafc6ba8acb in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
No symbol table info available.
(More stack frames follow...)
(gdb) bt full 12
#0  0x00005568a670cb3b in luaS_newlstr (L=L@entry=0x5568a8401c30, str=str@entry=0x7fafc6de4021 "SSL:Verify:Registry", l=19) at lstring.c:82
        o = <optimized out>
        h = 1821639967
        step = 1
        l1 = 0
#1  0x00005568a6703dec in lua_getfield (L=L@entry=0x5568a8401c30, idx=idx@entry=-10000, k=k@entry=0x7fafc6de4021 "SSL:Verify:Registry") at lapi.c:550
        i_o = 0x7ffd49fbc450
        t = 0x5568000000a4
        key = {
          value = {
            gc = 0x0,
            p = 0x0,
            n = 0,
            b = 0
          },
          tt = 1
        }
#2  0x00007fafc6de2ab0 in cert_verify_cb (x509_ctx=0x5568a92ebaf0, ptr=0x5568a8bfbc20) at src/context.c:225
        verify = <optimized out>
        L = 0x5568a8401c30
        ctx = 0x5568a8bfbc20
        pctx = <optimized out>
#3  0x00007fafc6b962ee in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
No symbol table info available.
#4  0x00007fafc6ba8acb in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
No symbol table info available.
#5  0x00007fafc6ba62cf in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
No symbol table info available.
#6  0x00007fafc6b9e9f1 in SSL_do_handshake () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
No symbol table info available.
#7  0x00007fafc6de10ee in handshake (ssl=0x5568a9346238) at src/ssl.c:119
        err = <optimized out>
        tm = 0x5568a9348298
#8  meth_handshake (L=0x5568a7cef010) at src/ssl.c:386
        ssl = 0x5568a9346238
#9  0x00005568a67068a0 in luaD_precall (L=L@entry=0x5568a7cef010, func=func@entry=0x5568a936fea0, nresults=nresults@entry=2) at ldo.c:320
        ci = <optimized out>
        n = <optimized out>
        cl = <optimized out>
        funcr = <optimized out>
#10 0x00005568a67101b2 in luaV_execute (L=L@entry=0x5568a7cef010, nexeccalls=2, nexeccalls@entry=1) at lvm.c:591
        b = <optimized out>
        nresults = 2
        i = <optimized out>
        ra = 0x5568a936fea0
        cl = 0x5568a7d2ef40
        base = <optimized out>
        k = 0x5568a7db10c0
        pc = 0x5568a7d37a44
#11 0x00005568a6706d1d in luaD_call (L=0x5568a7cef010, func=0x5568a7cf7210, nResults=<optimized out>) at ldo.c:378
No locals.
(More stack frames follow...)

This was on LuaSec 0.7 as used by Prosody. OpenSSL 1.1.0f-3+deb9u2. Debian Stable.

from luasec.

brunoos avatar brunoos commented on July 24, 2024

Question: Is this indicating that there are two Lua states involved in the same call?

  • L=L@entry=0x5568a7cef010
  • L=L@entry=0x5568a8401c30

from luasec.

Zash avatar Zash commented on July 24, 2024

There is only one Lua state, but there may be many coroutines. One possible explanation is that the coroutine in which the SSL context was created in has since been garbage-collected.

from luasec.

brunoos avatar brunoos commented on July 24, 2024

One problem is ctx->L saves the state that creates it.
This field must be updated at beginnig of meth_handshake() in ssl.c in order to keep a reference to the active thread.

from luasec.

Zash avatar Zash commented on July 24, 2024

Does this need to be done anywhere else? Re-negotiation maybe?

from luasec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.