wolfssh/wolfssh
John Safranek 285e0409cf Block every send after a disconnect
The disconnect flag gated wolfSSH_stream_read() and wolfSSH_stream_send(),
which is the client-side API. wolfsshd and echoserver drive their channels
through the channel-id calls, so the daemon was never gated at all.

- New SendAfterDisconnect() helper, used by the six send entry points:
  stream_send, stream_exit, ChannelIdSend, ChannelIdSendExt,
  extended_data_send and global_request.
- Reads stay open, since data that arrived before the disconnect is still
  the caller's. wolfSSH_stream_read() drains its buffer and reports
  WS_DISCONNECT only once it runs dry.
- wolfSSH_worker() stays ungated; the shutdown paths still pump it.
- ssh.h and internal.h describe the split.
- regress.c: buffered data survives the disconnect, and every send call
  refuses without a byte leaving the session.

Issue: F-8837

Every public send call means every one: the channel-pointer sends
(wolfSSH_ChannelSend, wolfSSH_ChannelSendExt, wolfSSH_ChannelExit), the
forwarding requests and both wolfSSH_ChannelFwdNew* opens carry the gate
too, and none of them had a message-filter backstop.

ChannelCreditWindow() parks its credit rather than sending. The reads that
drain what arrived before the disconnect credit the window for the bytes
taken, and that credit went straight to the transport: each drain put a
CHANNEL_WINDOW_ADJUST on the wire after the session was over, and a failing
send replaced the byte count already copied for the caller.
2026-08-26 20:15:01 -05:00
..
agent.h
certman.h
certs_test.h
error.h Add remaining ML-DSA composite signature algorithms 2026-08-10 14:51:37 -07:00
include.am
internal.h Block every send after a disconnect 2026-08-26 20:15:01 -05:00
keygen.h Add remaining ML-DSA composite signature algorithms 2026-08-10 14:51:37 -07:00
log.h
misc.h
ossh.h
port.h port: resolve the full SFTP offset in the Harmony and Zephyr ports 2026-08-18 15:01:39 -07:00
settings.h
ssh.h Block every send after a disconnect 2026-08-26 20:15:01 -05:00
test.h Use wolfCrypt's Base16_Decode in test.h when it is available 2026-08-16 12:30:15 -07:00
version.h
version.h.in
visibility.h
wolfscp.h scp: reject NULL message in SetScpErrorMsg 2026-08-10 10:31:07 -06:00
wolfsftp.h Split SFTP confinement from the start path 2026-08-20 09:56:48 -06:00