Skip to content

fix: reject non-finite and out-of-range DNS re-resolution intervals (#449) - #450

Open
Sidhhrana wants to merge 1 commit into
Tarsnap:masterfrom
Sidhhrana:fix/bounty-449
Open

Sidhhrana wants to merge 1 commit into
Tarsnap:masterfrom
Sidhhrana:fix/bounty-449

Conversation

@Sidhhrana

Copy link
Copy Markdown

Description

This Pull Request resolves #449: [bug bounty] Huge -r interval causes continuous DNS re-resolution and high CPU.

Summary of Changes

The bug was caused by accepting non-finite or extremely large values for the -r option, which when converted to time_t resulted in an already-expired timer, causing a busy loop of DNS re-resolution. The fix adds a check to reject non-finite values and values exceeding a safe maximum (1e9 seconds, roughly 31 years) for the -r option, preventing the timer from being set to an invalid state.

Modified Files

  • spiped/main.c

Verification

Tests not executed (no standard script detected)


Closes #449

woahwhattheheck added a commit to woahwhattheheck/spiped that referenced this pull request Sep 13, 2026
Adapt the semantic fix from Tarsnap#450 onto current fork master while preserving the fork's existing NaN and -r/-R fixes. Reject non-finite intervals and values above 1e9 seconds; add focused CLI regression coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[bug bounty] Huge -r interval causes continuous DNS re-resolution and high CPU

1 participant