Skip to content

docs(audits): io_uring bgid u16 namespace exhaustion bound (#2044)#3894

Merged
oferchen merged 1 commit into
masterfrom
audits/io-uring-bgid-exhaustion
May 7, 2026
Merged

docs(audits): io_uring bgid u16 namespace exhaustion bound (#2044)#3894
oferchen merged 1 commit into
masterfrom
audits/io-uring-bgid-exhaustion

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented May 7, 2026

Summary

  • Document the io_uring bgid u16 namespace ceiling (65 535 ids per ring) and locate every in-tree allocation site in crates/fast_io/src/io_uring/buffer_ring.rs.
  • Audit BufferRing drop semantics: kernel reclaims via IORING_UNREGISTER_PBUF_RING, but no in-process allocator owns the id space, so a future per-session factory could exhaust or wraparound-collide.
  • Propose a hard-capped slab allocator (16 384 reserved), Arc-tracked drop reuse, 50 % warn telemetry, and a typed exhaustion error before Fix clippy warning in sparse executor test #1936 / Deduplicate PATHEXT extensions when resolving fallbacks #1937 wire PBUF_RING through the per-session ring.

Test plan

  • CI fmt + clippy
  • Markdown renders cleanly on the GitHub PR preview

Document that buffer-group ids are u16 in io_uring (max 65 535 per
ring), audit current `BufferRing` lifecycle (kernel reclaims via
`IORING_UNREGISTER_PBUF_RING` on drop, but no in-process allocator
owns the namespace), sketch the long-running daemon worst case, and
propose a hard-capped slab allocator with telemetry and a typed
exhaustion error before #1936 / #1937 wire PBUF_RING through the
per-session ring.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 7, 2026
@oferchen oferchen merged commit 39f33b4 into master May 7, 2026
8 checks passed
@oferchen oferchen deleted the audits/io-uring-bgid-exhaustion branch May 8, 2026 03:47
oferchen added a commit that referenced this pull request May 18, 2026
…3894)

Document that buffer-group ids are u16 in io_uring (max 65 535 per
ring), audit current `BufferRing` lifecycle (kernel reclaims via
`IORING_UNREGISTER_PBUF_RING` on drop, but no in-process allocator
owns the namespace), sketch the long-running daemon worst case, and
propose a hard-capped slab allocator with telemetry and a typed
exhaustion error before #1936 / #1937 wire PBUF_RING through the
per-session ring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant