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

Limit max size of payloads #7629

Open
gjermundgaraba opened this issue Dec 7, 2024 · 1 comment · May be fixed by #7935
Open

Limit max size of payloads #7629

gjermundgaraba opened this issue Dec 7, 2024 · 1 comment · May be fixed by #7935
Assignees

Comments

@gjermundgaraba
Copy link
Contributor

gjermundgaraba commented Dec 7, 2024

To avoid DDOS scenarios with IBC, we should limit the maximum size of packets by limiting the payload size. We should do this for both v1 and v2 packets.

We will set the max limit to 262144 bytes.

For v1, we can check the data size in modules/core/04-channel/keeper/packet.go: SendPacket and RecvPacket.

For v2, we can check the total packets total payload size (sum packet.payloads sizes) in modules/core/04-channel/v2/keeper/msg_server.go: SendPacket and RecvPacket.

@gjermundgaraba gjermundgaraba added the needs discussion Issues that need discussion before they can be worked on label Dec 7, 2024
@github-project-automation github-project-automation bot moved this to Backlog in IBC-GO Eureka Dec 7, 2024
@DimitrisJim
Copy link
Contributor

Ref relevant spec issue cosmos/ibc#1160

(though spec would in theory only mention implementations could opt to add limits, so hashing out what these look like is ibc-go level discussion)

@gjermundgaraba gjermundgaraba removed the status in IBC-GO Eureka Feb 6, 2025
@gjermundgaraba gjermundgaraba self-assigned this Feb 6, 2025
@gjermundgaraba gjermundgaraba moved this to Backlog in IBC-GO Eureka Feb 6, 2025
@gjermundgaraba gjermundgaraba changed the title Limit max size of packets Limit max size of unbound packet fields Feb 6, 2025
@gjermundgaraba gjermundgaraba changed the title Limit max size of unbound packet fields Limit max size of payloads Feb 6, 2025
@gjermundgaraba gjermundgaraba changed the title Limit max size of payloads Limit max size of packets Feb 6, 2025
@gjermundgaraba gjermundgaraba changed the title Limit max size of packets Limit max size of payloads Feb 6, 2025
@gjermundgaraba gjermundgaraba removed their assignment Feb 6, 2025
@gjermundgaraba gjermundgaraba removed the needs discussion Issues that need discussion before they can be worked on label Feb 6, 2025
@gjermundgaraba gjermundgaraba self-assigned this Feb 6, 2025
@gjermundgaraba gjermundgaraba moved this from Backlog to In progress in IBC-GO Eureka Feb 7, 2025
@gjermundgaraba gjermundgaraba linked a pull request Feb 7, 2025 that will close this issue
10 tasks
@gjermundgaraba gjermundgaraba moved this from In progress to In review in IBC-GO Eureka Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In review
Development

Successfully merging a pull request may close this issue.

3 participants