Files
Matteo Collina 6c5b08e1fc http: never execute llhttp re-entrantly
llhttp is not reentrant: it keeps its position in the input in the
parser state and only updates it when `llhttp_execute()` returns.
Instead of supporting nested calls, make sure that llhttp never runs
inside itself.

- `socketOnData` on the server and the client puts data that arrives
  while the parser is executing back into the socket, and resumes the
  socket after the current call.
- `Parser::Execute()` does not run llhttp while it is already running.
  A nested call with data fails the outer call with
  `HPE_REENTRANT_EXECUTE`. A nested `finish()`, which comes from
  tearing down the connection in a callback, is skipped.

This replaces the buffer bounds check on data callbacks.

Refs: https://hackerone.com/reports/4150886
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1021
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Tim Perry <pimterry@gmail.com>
CVE-ID: CVE-2026-123864
2026-11-11 17:59:41 +01:00
..
…
…