Skip to content

Header frame with non-zero content-length and END_STREAM is malformed #813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

eaufavor
Copy link
Contributor

Before this change, content-length underflow is only checked when receiving date frames.

This change adds similar check for headers frames.

@eaufavor eaufavor force-pushed the content-length-end-header branch from 7f1b98d to 86d07ab Compare November 11, 2024 19:54
Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thanks!

@seanmonstar
Copy link
Member

I'm fixing the MSRV job in #814.

Before this change, content-length underflow is only checked when
receiving date frames. The underflow error was never triggered if
data frames are never received.

This change adds similar check for headers frames.
@eaufavor eaufavor force-pushed the content-length-end-header branch from 86d07ab to 24a065f Compare November 11, 2024 21:58
@seanmonstar seanmonstar enabled auto-merge (squash) November 11, 2024 22:03
@seanmonstar seanmonstar merged commit 640db36 into hyperium:master Nov 11, 2024
6 checks passed
cxw620 pushed a commit to hanyu-dev/miku-h2 that referenced this pull request Jan 20, 2025
* chore: allow matching infallible (hyperium#796)

* v0.4.6

* chore(ci): use tokio-util 0.7.11 in MSRV check

* style: replace `split_to` and `split_off` with better alternatives

This removes `let _ = ` from in front of `split_to` and `split_off`
and mostly follows the suggestions from the `#[must_use]` impls.
One of the uses of `split_to` is instead replaced with `take`.

* improve ci/h2spec.sh (macOS compat, /tmp dir and overwrite) (hyperium#809)

- detect if run on MacOS, so we download h2spec macos build in that case
- support overwriting h2spec detection so we anyway download new file,
  useful in case you switch to new version for example
- move h2spec, archive and log all to /tmp dir as to not polute
  the repo dir

* ci: pin hashbrown for msrv job (hyperium#814)

* fix: HEADERS frame with non-zero content-length and END_STREAM is malformed (hyperium#813)

Before this change, content-length underflow is only checked when
receiving date frames. The underflow error was never triggered if
data frames are never received.

This change adds similar check for headers frames.

* fix: notify_recv after send_reset() in reset_on_recv_stream_err() to ensure local stream is released properly (hyperium#816) (hyperium#818)

Similar to what have been done in fn send_reset<B>(), we should notify RecvStream that is parked after send_reset().

Co-authored-by: Jiahao Liang <[email protected]>

---------

Co-authored-by: Sean McArthur <[email protected]>
Co-authored-by: tottoto <[email protected]>
Co-authored-by: Paolo Barbolini <[email protected]>
Co-authored-by: Glen De Cauwsemaecker <[email protected]>
Co-authored-by: Yuchen Wu <[email protected]>
Co-authored-by: Jiahao Liang <[email protected]>
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.

2 participants