Skip to content

Harden crucible-kueue against log, quantity, and results DoS - #548

Merged
wseaton merged 1 commit into
mainfrom
kueue-dos-results-hardening
Dec 2, 2026
Merged

wseaton merged 1 commit into
mainfrom
kueue-dos-results-hardening

Conversation

@wseaton

@wseaton wseaton commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Batch 2 of the crucible-kueue audit:

  • H-3 (paged workload_logs DoS & timeouts): cap offset at 64 MiB (MAX_PAGED_LOG_OFFSET), wrap log_page and follow_log stream open in timeouts, and use VecDeque for follow_log's rolling buffer.
  • H-6 (ParsedQuantity overflow panics): bound container resource requests in [0, 100Ti] so kube_quantity arithmetic cannot overflow and panic inside normalize().
  • H-8 (crucible-results spoofing & archive DoS): unconditionally reserve the crucible-results container/volume name in manifest.rs, cap directory recursion depth (64) and visited dirs in results::Walk, enforce MAX_FILES and cumulative byte cap in Reader::unpack, run unpack on spawn_blocking, use saturating_add for total_bytes, and time-bound collector log streaming.

@wseaton
wseaton enabled auto-merge December 1, 2026 23:42
@wseaton
wseaton added this pull request to the merge queue Dec 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Dec 2, 2026
- Cap paged workload_logs offset at 64 MiB, add a timeout to log_page
  and follow_log stream open, and switch follow_log's rolling buffer to
  VecDeque.
- Enforce non-negative and 100Ti upper bounds on parsed resource
  quantities so kube_quantity arithmetic cannot overflow and panic.
- Unconditionally reserve the crucible-results container/volume name in
  manifest validation, cap directory recursion depth and visited dirs in
  results::Walk, enforce MAX_FILES and cumulative byte limits in
  Reader::unpack, run unpack in spawn_blocking, use saturating_add for
  total_bytes, and time-bound collector log reads.

Assisted-by: Claude
@wseaton
wseaton force-pushed the kueue-dos-results-hardening branch from f99ce62 to e611fe5 Compare December 2, 2026 00:09
@wseaton
wseaton enabled auto-merge December 2, 2026 00:09
@wseaton
wseaton added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 1aaf42b Dec 2, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant