Skip to content

Wrap SFTP request identifiers safely - #179

Open
OskarEichler wants to merge 1 commit into
net-ssh:masterfrom
OskarEichler:codex/request-id-only
Open

Wrap SFTP request identifiers safely#179
OskarEichler wants to merge 1 commit into
net-ssh:masterfrom
OskarEichler:codex/request-id-only

Conversation

@OskarEichler

Copy link
Copy Markdown

Problem: Ruby request IDs can grow without bounds, but SFTP serializes them as unsigned 32-bit values. After wraparound, responses could no longer match their pending request keys.

Fix: Allocate IDs in the wire-format range and skip IDs that are still pending after the counter wraps.

Regression coverage: Adds focused upstream coverage for wraparound and pending-ID avoidance. Protocol base tests: 8 runs / 17 assertions. Full suite: 435 runs / 1,202 assertions with only the pre-existing Ruby 4 StartTest positional-hash/keyword expectation failure.

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.

1 participant