AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 33 Bitcoin

init: clamp fd limits to int

Public commit record

What the developer wrote

Authored by Sjors Provoost

68/100 · Adequate
init: clamp fd limits to int

When setting the fd limit to 1 >> 31, the node fails to start:

ulimit -n 214748364
build/bin/bitcoind
Error: Not enough file descriptors available. -2147483648 available, 160 required.

Similar to the previous commit, this is fixed by capping the limit
to std::numeric_limits<int>::max().

Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug where Bitcoin Core would fail to start if the operating system allowed an unusually high number of open files (file descriptors). The limit was being treated as a negative number due to a conversion overflow, causing the program to incorrectly report that no file descriptors were available. The fix caps the value at the maximum a normal integer can hold, preventing the startup failure.

Recommended action

Apply the patch. It is a low-risk defensive fix that prevents a startup failure on systems with very high or misconfigured RLIMIT_NOFILE values. No immediate incident response is required.

Security signals we found

01

Integer overflow / signedness conversion in resource-limit handling

02

Denial-of-service vector: malformed/incompatible system ulimit can prevent node startup

03

Startup failure due to negative available file descriptor count

Risk score

Why this scored 33/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 3/15
Affected reach 5/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.