Skip to content

fix(proto): Gracefully handle invalid PATH_ACK frames#592

Merged
flub merged 2 commits intomainfrom
matheus23/fix-path-ack-handling
Apr 14, 2026
Merged

fix(proto): Gracefully handle invalid PATH_ACK frames#592
flub merged 2 commits intomainfrom
matheus23/fix-path-ack-handling

Conversation

@matheus23
Copy link
Copy Markdown
Member

Description

This fixes some bugs found via #585.

When a connection doesn't support multipath, or it receives a malicious or misconstructed PATH_ACK frame that has e.g. a path_id of 1, which the current connection may not actually have any state for, this would previously cause us to panic.

With this change we exit out with a PROTOCOL_VIOLATION connection close instead.

Notes & open questions

I don't have a regression test for this yet. It is generated in #585 and uses the test setup from #589, which both aren't merged yet.

I'll make sure to re-generate the regression test and add it in #585 once that's ready.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.

@matheus23 matheus23 requested a review from flub April 14, 2026 15:03
@matheus23 matheus23 self-assigned this Apr 14, 2026
@github-actions
Copy link
Copy Markdown

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/592/docs/noq/

Last updated: 2026-04-14T15:05:56Z

Copy link
Copy Markdown
Collaborator

@flub flub left a comment

Choose a reason for hiding this comment

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

LGTM

@flub flub enabled auto-merge April 14, 2026 15:06
@n0bot n0bot bot added this to iroh Apr 14, 2026
@github-project-automation github-project-automation bot moved this to 🚑 Needs Triage in iroh Apr 14, 2026
@github-actions
Copy link
Copy Markdown

Performance Comparison Report

1f88b372f4c47cc1961f5acee05781546846facf - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5937.2 Mbps 8063.2 Mbps -26.4% 96.4% / 149.0%
medium-concurrent 5449.9 Mbps 7384.3 Mbps -26.2% 95.5% / 100.0%
medium-single 4341.1 Mbps 4732.5 Mbps -8.3% 99.6% / 150.0%
small-concurrent 3974.5 Mbps 5309.8 Mbps -25.1% 93.8% / 103.0%
small-single 3629.5 Mbps 4713.6 Mbps -23.0% 95.4% / 104.0%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal N/A 3967.3 Mbps N/A
lan N/A 810.4 Mbps N/A
lossy N/A 69.9 Mbps N/A
wan N/A 83.8 Mbps N/A

Summary

noq is 22.8% slower on average

@flub flub added this pull request to the merge queue Apr 14, 2026
Merged via the queue into main with commit a0481ac Apr 14, 2026
61 of 62 checks passed
@flub flub deleted the matheus23/fix-path-ack-handling branch April 14, 2026 16:33
@github-project-automation github-project-automation bot moved this from 🚑 Needs Triage to ✅ Done in iroh Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants