Stream: git-wasmtime

Topic: wasmtime / PR #15317 wasi: don't queue zero-length writes...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 21:36):

fitzgen opened PR #15317 from fitzgen:main-backport-a81c82ebe3 to bytecodealliance:main:

AsyncWriteStream::write queued every buffer it was handed, including empty ones. A zero-length write consumes no check_write budget, so the budget did not bound how many of them could be queued: each call pushed one Bytes slot onto the worker's VecDeque (and that deque never shrinks). A guest issuing output-stream.write with an empty list in a loop could therefore grow host memory without bound, especially while the background writer was parked on a backpressured destination.

Treat an empty write as a no-op. The background worker already did nothing with an empty buffer, so this is not observable to the guest. With empty writes dropped, every queued entry holds at least one byte of budget, so the queue length is bounded by the write budget.

GHSA-5m8g-xhq4-4h93

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 21:36):

fitzgen removed the review request for wasmtime-wasi-reviewers from PR #15317.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 21:36):

fitzgen requested wasmtime-wasi-reviewers for a review on PR #15317.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 21:36):

fitzgen requested dicej for a review on PR #15317.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 21:40):

:thumbs_up: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 21:40):

alexcrichton has enabled auto merge for PR #15317.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 21:47):

alexcrichton added PR #15317 wasi: don't queue zero-length writes to AsyncWriteStream to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 22:09):

:check: alexcrichton merged PR #15317.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 22:09):

alexcrichton removed PR #15317 wasi: don't queue zero-length writes to AsyncWriteStream from the merge queue.


Last updated: Nov 19 2026 at 20:05 UTC