Skip to content

Underflow in Chunk::Parse leads to a hard lockup when parsing a chunk #1308

@vaxerski

Description

@vaxerski

I have a reverse-proxy written with Pistache, and every 10 minutes to a few hours, the proxy gets stuck. The CPU usage rises to 200%, and the proxy is unable to continue at all.

I've caught some stacktraces, and it seems that it's stuck advancing through a TE stream buffer.

Image

While another thread is supposedly waiting for that to finish on a mutex

Image

I've built with debug right now and will wait until it happens again and provide locals.

There is a timeout set for the requests of 30s, but it does not seem to do anything.

In any case, even if the TE is incorrect (or malicious), pistache should not just die. The reverse-proxy is for a git forge (forgejo) so it uses TE quite a lot for the git revs, I've definitely spotted that with git clones via HTTP(s).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions