Stream: git-wasmtime

Topic: wasmtime / PR #15315 wasi-http p2/p3: drop empty body writes


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

fitzgen opened PR #15315 from fitzgen:main-backport-53c37d2015 to bytecodealliance:main:

Empty body writes have been shown to be a vector for unmetered heap growth in some http implementations. Drop these writes while still maintaining behavior that guest's may rely on.

For p2 BodyWriteStream, empty writes are dropped but Err(StreamError::Closed) is still returned if the underlying writer is closed.

For p3 {Limited,Unlimited}GuestBodyConsumer emtpy writes will maintain the same behavior of waiting until there is capacity to write (Ready) but at the time that we would have previously written the empty buffer over channels, we just mark the chunk as completed without being sent avoiding potential unbound memory growth channels in backing implementations, including hyper/h2.

Neither p2 or p3 wasi:http specifies behavior for empty body writes, and body contents are a byte stream with no defined mapping onto HTTP framing, so skipping them leaves the transmitted body unchanged:

GHSA-f8mm-ggr3-89wh

<!--
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:33):

fitzgen requested rvolosatovs for a review on PR #15315.

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

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

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

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

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

alexcrichton has enabled auto merge for PR #15315.

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:43):

alexcrichton added PR #15315 wasi-http p2/p3: drop empty body writes to the merge queue.

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

:check: alexcrichton merged PR #15315.

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

alexcrichton removed PR #15315 wasi-http p2/p3: drop empty body writes from the merge queue.


Last updated: Nov 19 2026 at 20:05 UTC