Files
dragonx/qa
DanSandClaude Opus 5.5 3537531901 rpc: cap HTTP request headers at 8 KiB, and keep getblocktemplate from aborting on an error
From the general audit, both still on dev:

- libevent's max_headers_size defaults to unlimited, and the request line and headers are buffered
  before the -rpcallowip check or authentication runs, so one connection could grow the node's memory
  with every byte it sent. Capped at 8 KiB. Regtest: a 9 KiB header and a 10 KiB request line now get
  400 (the old binary accepted the first and processed the second); normal calls are unaffected.
  qa/rpc-tests/httpbasics.py gains a request-line case.
- getblocktemplate left cs_main with LEAVE_CRITICAL_SECTION around CreateNewBlockWithKey. If that
  threw (a wallet or BDB fault), the enclosing scoped lock's destructor unlocked an already unlocked
  mutex while unwinding, which aborts the node with nothing logged. It now re-enters cs_main first,
  so the error reaches the caller. Regtest: getblocktemplate returns templates as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-20 20:10:01 -06:00
..
2024-03-04 08:57:14 -05:00
2024-02-27 23:59:59 +01:00