Repository navigation
sftp: close transfer handles on failure and report local read errors - #1327
Merged
Merged
Conversation
ageprocpp
force-pushed
the
fix/fenrir-13323
branch
from
October 19, 2026 16:30
a6f739d to
e861faa
Compare
Member
|
Okay to test. Thank you @ageprocpp |
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1327
Scan targets checked: wolfssh-src, wolfssh-bugs
Coverage: 3 of 3 in-scope changed file(s) opened by the reviewer
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Lite
ejohnstown
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
SFTP GET and PUT can leave remote file handles open after transfer failures. PUT can also mistake a local read error for EOF and report success.
Close opened handles on these failure paths and preserve the original error while cleanup completes, including across nonblocking CLOSE retries. Distinguish local read errors from EOF during uploads.
Add regression tests for transfer failure cleanup, delayed and split CLOSE responses, and local read errors. Rename local state pointers to clarify which operation they belong to.
Addresses Fenrir findings 13321, 13322, and 13323.
Validation: the new regression tests fail before the fixes and pass afterward. The full unit test runner passes.
make checkreports 7 passed, 3 skipped, and 1 failed; the OpenSSH interoperability failure also reproduces on upstream master.