Git Product home page Git Product logo

Comments (2)

marten-seemann avatar marten-seemann commented on September 23, 2024

Interesting. The crypto/tls code is accessing a session ticket that (presumably) has been retrieved from the session cache, while the session cache is modifying the ticket.

I suspect this is happening because you're concurrently dialing two connections that are both trying to resume using the same session ticket. We probably need to protect the session cache with a mutex.

from quic-go.

marten-seemann avatar marten-seemann commented on September 23, 2024

However, I think this can only happen if the underlying ClientSessionCache actually returns the same session ticket multiple times. If the underlying ClientSessionCache was well-behaved and only returned every ticket once, there'd be no way that two Go routines would access the same session ticket and create the race condition you're observing.

See RFC 8446 and RFC 9001 regarding the reuse of session tickets.

Strictly speaking, it's not forbidden to reuse the session ticket though (it's just a "SHOULD NOT"), so maybe we should introduce the mutex anyway. That would make it safer for our users to shoot themselves in the foot.

from quic-go.

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.