command line settings are not validated exaustively #36763

issue maflcko opened this issue on November 4, 2026
  1. maflcko commented at 7:18 PM on November 4, 2026: member

    Some numeric command line settings are not range-checked before being used arithmetically or converted to narrower types. This can lead to integer arithmetic issues or bugs.

    Generally, users of Bitcoin Core are expected to not set nonsensical values for settings, if they do not understand it.

    This is a "tracking" issue, because basically all settings are affected. Though, I am not sure how pressing it is to fix all of them.

  2. maflcko added the label Brainstorming on Nov 4, 2026
  3. maflcko added the label Settings on Nov 4, 2026
  4. maflcko added the label Tracking Issue on Nov 4, 2026
  5. theAnuragMishra commented at 10:17 AM on November 6, 2026: none

    @maflcko are you open to prs adding some checks? or should i open issues to discuss anything i do first?

  6. maflcko commented at 11:28 AM on November 6, 2026: member

    I think when the issue is: My cat walked over the keyboard while I was starting Bitcoin Core and this resulted in "invalid" options, it could make sense to wait for some larger reason first. If the issue is something that a well-educated user may run into due to misunderstanding or if there are real reports, it can be fixed. I'd say it is a case-by-case basis for now.

  7. victrvondoom commented at 5:37 PM on November 19, 2026: none

    I can take a narrow, evidence-based first case; please assign me a specific setting if maintainers want that contribution. An efficient approach is to trace only settings with a concrete report or clear arithmetic/narrowing conversion, add a range check at the boundary, and cover the accepted limits with focused tests rather than applying a blanket policy to every option. The less-obvious factor is compatibility: some settings use sentinel or special values, so generic bounds can reject valid configurations or change behavior without fixing a real problem.

  8. bitcoin blocked a user on Nov 19, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-11-27 03:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me