GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Limit the number of Continuation frames per HTTP2 Headers by normanmaurer · Pull Request #13969 · netty/netty

Conversation

@normanmaurer

@normanmaurer normanmaurer commented Apr 11, 2024

Copy link
Copy Markdown
Member

Motivation:

We should limit the number of continuation frames that the remote peer is allowed to sent per headers.

Modifications:

  • Limit the number of continuation frames by default to 16 and allow the user to change this.
  • Add unit test

Result:

Do some more validations to guard against resource usage

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@normanmaurer
normanmaurer requested review from bryce-anderson, chrisvest and idelpivnitskiy April 11, 2024 12:24
@normanmaurer normanmaurer added this to the 4.1.109.Final milestone Apr 11, 2024
@normanmaurer
normanmaurer requested a review from ejona86 April 11, 2024 12:41
idelpivnitskiy
idelpivnitskiy approved these changes Apr 11, 2024
View reviewed changes
@ejona86

ejona86 commented Apr 11, 2024

Copy link
Copy Markdown
Member

Since the default is getting set to 16, this looks like it would break existing users that allow MAX_HEADER_LIST_SIZE > 256 KiB. I'm also not wild about a config option like this which needs a reasonable amount of understanding of how other settings work together.

Could we instead base this off of MAX_HEADER_LIST_SIZE? Or only count CONTINUATIONS that are less than half of 16 KiB (which seems better than half of MAX_FRAME_SIZE), and only allow 1ish of such CONTINUATIONS? Or more simply "reject a CONTINUATION with END_HEADERS=0 if it is less than 8 KiB." Even if we have configuration for these, virtually nobody would need to actually use the setting.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bryce-anderson

bryce-anderson commented Apr 11, 2024

Copy link
Copy Markdown
Contributor

The implementation looks good but I agree with Eric about his concern regarding a fix number of frames. I do like his solution of rejecting < 8KiB non-terminal continuation frames. The exact size of rejecting could be the tuning parameter where 0 is 'not checked'.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer normanmaurer modified the milestones: 4.1.109.Final, 4.1.110.Final Apr 15, 2024
@normanmaurer normanmaurer modified the milestones: 4.1.110.Final, 4.1.111.Final May 22, 2024
@normanmaurer normanmaurer modified the milestones: 4.1.111.Final, 4.1.112.Final Jun 11, 2024
@normanmaurer normanmaurer modified the milestones: 4.1.112.Final, 4.1.113.Final Jul 19, 2024
@normanmaurer normanmaurer modified the milestones: 4.1.113.Final, 4.1.114.Final Sep 3, 2024
@normanmaurer normanmaurer modified the milestones: 4.1.114.Final, 4.1.115.Final Oct 1, 2024
@normanmaurer normanmaurer modified the milestones: 4.1.115.Final, 4.1.116.Final Nov 12, 2024
@normanmaurer normanmaurer modified the milestones: 4.1.116.Final, 4.1.117.Final Dec 17, 2024
@normanmaurer normanmaurer modified the milestones: 4.1.117.Final, 4.1.118.Final Jan 14, 2025
@normanmaurer normanmaurer modified the milestones: 4.1.118.Final, 4.1.119.Final Feb 13, 2025
@normanmaurer normanmaurer modified the milestones: 4.1.119.Final, 4.1.120.Final Feb 26, 2025
chrisvest
chrisvest approved these changes Mar 20, 2026
View reviewed changes

@chrisvest chrisvest left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

One thing but otherwise looks good.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2FrameReaderTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer
add test
33a12d6
bryce-anderson
bryce-anderson reviewed Mar 20, 2026
View reviewed changes
Comment thread ...-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2FrameReader.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2FrameReader.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

bryce-anderson
bryce-anderson reviewed Mar 20, 2026
View reviewed changes
Comment thread ...-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

chrisvest
chrisvest approved these changes Mar 20, 2026
View reviewed changes
ejona86
ejona86 approved these changes Mar 20, 2026
View reviewed changes

@ejona86 ejona86 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I agree with the need for style/docs mentioning "small." But the approach LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
normanmaurer and others added 3 commits March 23, 2026 10:44
@normanmaurer @bryce-anderson
Apply suggestions from code review
c79c92e
Co-authored-by: Bryce Anderson <[email protected]>
@normanmaurer
Fix compile error
a90ee87
@normanmaurer
Address comments
5aeaf4f
@normanmaurer
normanmaurer requested a review from bryce-anderson March 23, 2026 10:03
@normanmaurer

normanmaurer commented Mar 23, 2026

Copy link
Copy Markdown
Member Author

@bryce-anderson all addressed... PTAL

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer normanmaurer added needs-cherry-pick-4.2 This PR should be cherry-picked to 4.2 once merged. needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. labels Mar 23, 2026
bryce-anderson
bryce-anderson approved these changes Mar 23, 2026
View reviewed changes

@bryce-anderson bryce-anderson left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

lgtm other than defining what small means.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

chrisvest
chrisvest approved these changes Mar 23, 2026
View reviewed changes

@chrisvest chrisvest left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Generally looks good. Spotted one style issue. I'd also like a definition for "small" though I don't fully understand Bryce's proposed phrasing.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread codec-http2/src/main/java/io/netty/handler/codec/http2/Http2CodecUtil.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bryce-anderson

bryce-anderson commented Mar 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

I'd also like a definition for "small" though I don't fully understand Bryce's proposed phrasing.

Indeed, I tried to clean it up a bit more. Don't feel compelled to take my suggestions as is but users should know that small means < 8KiB.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

normanmaurer and others added 2 commits March 24, 2026 08:12
@normanmaurer @bryce-anderson @chrisvest
Apply suggestions from code review
d50056f
Co-authored-by: Bryce Anderson <[email protected]>
Co-authored-by: Chris Vest <[email protected]>
@normanmaurer
Fix checkstyle
06a9d98
@normanmaurer
normanmaurer merged commit 9f47a7b into 4.1 Mar 24, 2026
19 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer
normanmaurer deleted the limit_continuation_frame branch March 24, 2026 12:39
netty-project-bot pushed a commit that referenced this pull request Mar 24, 2026
@normanmaurer @bryce-anderson
@chrisvest @netty-project-bot
Limit the number of Continuation frames per HTTP2 Headers (#13969)
62000bb
Motivation:

We should limit the number of continuation frames that the remote peer
is allowed to sent per headers.

Modifications:

- Limit the number of continuation frames by default to 16 and allow the
user to change this.
- Add unit test

Result:

Do some more validations to guard against resource usage

---------

Co-authored-by: Bryce Anderson <[email protected]>
Co-authored-by: Chris Vest <[email protected]>
(cherry picked from commit 9f47a7b)
netty-project-bot pushed a commit that referenced this pull request Mar 24, 2026
@normanmaurer @bryce-anderson
@chrisvest @netty-project-bot
Limit the number of Continuation frames per HTTP2 Headers (#13969)
c85facf
Motivation:

We should limit the number of continuation frames that the remote peer
is allowed to sent per headers.

Modifications:

- Limit the number of continuation frames by default to 16 and allow the
user to change this.
- Add unit test

Result:

Do some more validations to guard against resource usage

---------

Co-authored-by: Bryce Anderson <[email protected]>
Co-authored-by: Chris Vest <[email protected]>
(cherry picked from commit 9f47a7b)
@netty-project-bot

netty-project-bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #16535

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@netty-project-bot netty-project-bot mentioned this pull request Mar 24, 2026
Auto-port 5.0: Limit the number of Continuation frames per HTTP2 Headers #16535
Merged
@netty-project-bot

netty-project-bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Auto-port PR for 4.2: #16536

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Mar 24, 2026
@netty-project-bot netty-project-bot mentioned this pull request Mar 24, 2026
Auto-port 4.2: Limit the number of Continuation frames per HTTP2 Headers #16536
Merged
@github-actions github-actions Bot removed the needs-cherry-pick-4.2 This PR should be cherry-picked to 4.2 once merged. label Mar 24, 2026
normanmaurer added a commit that referenced this pull request Mar 24, 2026
@netty-project-bot @normanmaurer
@bryce-anderson @chrisvest
Auto-port 4.2: Limit the number of Continuation frames per HTTP2 Head…
aae944a
…ers (#16536)

Auto-port of #13969 to 4.2
Cherry-picked commit: 9f47a7b

---
Motivation:

We should limit the number of continuation frames that the remote peer
is allowed to sent per headers.

Modifications:

- Limit the number of continuation frames by default to 16 and allow the
user to change this.
- Add unit test

Result:

Do some more validations to guard against resource usage

Co-authored-by: Norman Maurer <[email protected]>
Co-authored-by: Bryce Anderson <[email protected]>
Co-authored-by: Chris Vest <[email protected]>
normanmaurer added a commit that referenced this pull request Mar 24, 2026
@netty-project-bot @normanmaurer
@bryce-anderson @chrisvest
Auto-port 5.0: Limit the number of Continuation frames per HTTP2 Head…
9e6b1ff
…ers (#16535)

Auto-port of #13969 to 5.0
Cherry-picked commit: 9f47a7b

---
Motivation:

We should limit the number of continuation frames that the remote peer
is allowed to sent per headers.

Modifications:

- Limit the number of continuation frames by default to 16 and allow the
user to change this.
- Add unit test

Result:

Do some more validations to guard against resource usage

Co-authored-by: Norman Maurer <[email protected]>
Co-authored-by: Bryce Anderson <[email protected]>
Co-authored-by: Chris Vest <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@bryce-anderson bryce-anderson bryce-anderson approved these changes
@chrisvest chrisvest chrisvest approved these changes
@ejona86 ejona86 ejona86 approved these changes
@idelpivnitskiy idelpivnitskiy idelpivnitskiy approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.1.132.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@normanmaurer @ejona86 @bryce-anderson @netty-project-bot @chrisvest @idelpivnitskiy
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.