Repository navigation
examples: fix short writes and lost sessions - #1388
ejohnstown wants to merge 4 commits into
Conversation
The relay and the EOF drain hand channel data to the local socket through app_write_all(), the helper the echoserver uses, so a short send() no longer drops the rest of a chunk already taken from the channel. Issue: F-13908
|
@claude review |
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1388
Scan targets checked: wolfssh-src, wolfssh-bugs
Not reviewed (no scan target covers them): scripts/fwd-lost.test, scripts/include.am
Coverage: 3 of 3 in-scope changed file(s) opened by the reviewer
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
Review tier: Max
The forwarding loop leaves on any wolfSSH_worker() status outside the progress set the reply wait accepts. A fatal error counts as progress only when it is an idle WS_WANT_READ or WS_WANT_WRITE, so a peer that hangs up no longer leaves the loop spinning on a readable socket. - treat a refused open (WS_CHANOPEN_FAILED) as a lost channel, not a lost session - skip the cancel, shutdown and disconnect when the session is gone - exit with a nonzero return code after a lost session - add scripts/fwd-lost.test: kill the echoserver under a local and a reverse forward, expect a nonzero exit; a refused open exits 0 Issue: F-16748
The client reads until every byte it sent has come back, driving a rekey with wolfSSH_worker() when stream_read reports one, and fails unless the echo matches what was sent. Issue: F-12550
TpmCsMakeKeyAndCert() reads rc as the DER length only right after wolfTPM2_CSR_Generate_ex(), so a positive TPM_RC from an earlier wolfTPM step stays a failure. Issue: F-16750
4845ec2 to
69a20df
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1388
Scan targets checked: wolfssh-src, wolfssh-bugs
Not reviewed (no scan target covers them): scripts/fwd-lost.test, scripts/include.am
Coverage: 1 of 1 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
Fenrir's latest completed scan found no issues; clearing the prior automated change request.
portfwd and the TPM examples no longer lose data on a short write or a
partial echo, and portfwd exits when the SSH session is gone.
lost session; fwd-lost.test covers it
the CSR result as a length
Issue: F-12550, F-13908, F-16748, F-16750