Skip to content
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

add http limit for the Slowloris attack #3951

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

zishen
Copy link
Member

@zishen zishen commented Aug 17, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it:
Avoid slow http attack.

Which issue(s) this PR fixes:
Fixes #3945

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Security: Sets an upper bound for all components on the lifetime of idle keep-alive connections and time to read the headers of incoming requests.

@RainbowMango @XiShanYongYe-Chang PTAL

Signed-off-by: Tanggui Bian <softwarebtg@163.com>
@karmada-bot karmada-bot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 17, 2023
@karmada-bot karmada-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 17, 2023
@XiShanYongYe-Chang
Copy link
Member

We don't need to set IdleTimeout, do we?

@zishen
Copy link
Member Author

zishen commented Aug 17, 2023

IdleTimeout

Yea, we donot need to set. If IdleTimeout not set, it will use ReadTimeout.

see here

	if h1, h2 := s, conf; h2.IdleTimeout == 0 {
		if h1.IdleTimeout != 0 {
			h2.IdleTimeout = h1.IdleTimeout
		} else {
			h2.IdleTimeout = h1.ReadTimeout
		}
	}

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm

@XiShanYongYe-Chang Do you have any concerns?

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 17, 2023
@RainbowMango
Copy link
Member

/remove-kind bug
/kind cleanup

@karmada-bot karmada-bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kind/bug Categorizes issue or PR as related to a bug. labels Aug 17, 2023
Copy link
Member

@XiShanYongYe-Chang XiShanYongYe-Chang left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/approve

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 17, 2023
@karmada-bot karmada-bot merged commit dc921e8 into karmada-io:master Aug 17, 2023
12 checks passed
@zishen zishen deleted the slowloris-attack branch August 18, 2023 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Slow-Rate Attack bug
4 participants