• src/syncterm/ssh.c

    From Deucе@VERT to Git commit to main/sbbs/master on Sunday, March 15, 2026 01:06:05
    https://gitlab.synchro.net/main/sbbs/-/commit/a45466867429f3ad7043fb5e
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Add missing NULL checks on malloc() in ssh_connect()

    conn_api.rd_buf and conn_api.wr_buf were allocated with malloc() but
    never checked for failure. The I/O threads started immediately after
    would dereference the NULL pointers and crash. Other connection types (conn_pty.c, conn_conpty.c, modem.c, rlogin.c) already had these
    checks; ssh.c was an oversight.

    The error paths also free(pubkey), which is either a valid allocation
    from get_public_key() or the initial NULL — both safe for free().

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sunday, March 15, 2026 14:09:13
    https://gitlab.synchro.net/main/sbbs/-/commit/0d4a52ec4893ef1cb472f45f
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Add missing create_conn_buf() error checks in ssh.c

    Check return values and clean up on failure, matching the pattern
    used by all other connection providers (rlogin, telnet, modem, pty,
    conpty).

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thursday, April 23, 2026 18:36:00
    https://gitlab.synchro.net/main/sbbs/-/commit/2b39083e8614601afbacc67c
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    SyncTERM: send TERM environment variable on SSH channel

    Add an SSH "env" request (RFC 4254 §6.4) alongside the existing pty-req
    TERM, so servers that read TERM from the environment (rather than from
    the pty allocation) pick up SyncTERM's emulation string.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thursday, April 23, 2026 18:36:00
    https://gitlab.synchro.net/main/sbbs/-/commit/4781761a1bdbbe54562ed0b4
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    SyncTERM: warn the user about weak SSH host keys

    Treat any RSA-family host key under 2048 bits as weak (NIST 2024 floor;
    Ed25519 is always 256 and considered strong). The host-key verify
    callback now stashes the algorithm name and key size so the post-
    handshake UI can act on it:

    - HOSTKEY_NEW + weak: prompt "Weak host key (NNNN-bit algo)" with a
    Disconnect/Accept choice instead of silent TOFU. Under hidepopups
    (no human present) refuse the connection rather than auto-trust a
    weak key.
    - HOSTKEY_MISMATCH + weak: existing change-fingerprint dialog grows a
    "WARNING: the new key is a NNNN-bit algo, below the 2048-bit safety
    floor" block, and the title itself becomes "Fingerprint Changed —
    WEAK NNNN-bit algo key" so the warning is visible without F1.
    - Strong keys: behaviour unchanged (NEW silently TOFU's, MISMATCH
    uses the original dialog).

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thursday, April 23, 2026 18:36:00
    https://gitlab.synchro.net/main/sbbs/-/commit/54ee6004c208dc090d31703f
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    SyncTERM: display SSH auth banners (RFC 4252 §5.4)

    Wire DeuceSSH's per-session banner callback to uifc.showbuf().
    Each SSH_MSG_USERAUTH_BANNER from the server is shown modally as it
    arrives during authentication; auth resumes when the user dismisses.
    Skipped under bbs->hidepopups (automated sessions with no human to
    read the banner).

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Tuesday, May 05, 2026 05:32:15
    https://gitlab.synchro.net/main/sbbs/-/commit/067482fe2025fe188e3832d1
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Don't open an SFTP channel if "SSH Public Key" is disabled

    I need to rename that option.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Saturday, July 11, 2026 09:16:11
    https://gitlab.synchro.net/main/sbbs/-/commit/3259b99834f1bb55ae4b6e51
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Allow aborting SFTP init during SSH connect

    Poll the SFTP INIT wait so a keystroke can abort connection
    setup instead of leaving the user stuck at Opening Channel.

    If the init wait is aborted or the SFTP recv thread exits first,
    finish the SFTP client before freeing the pending request so the
    init callback can unwind normally.

    Reference: ticket 265

    Co-Authored-By: OpenAI Codex <noreply@openai.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net