• src/ssh/test/test_auth.c

    From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, March 23, 2026 20:49:18
    https://gitlab.synchro.net/main/sbbs/-/commit/17d44539e6157fe2cc0edf44
    Modified Files:
    src/ssh/test/test_auth.c
    Log Message:
    Add 11 server auth parse error tests

    Tests send malformed USERAUTH_REQUEST packets through an encrypted
    session to exercise parse_userauth_prefix and method-specific parse
    branches in dssh_auth_server:

    - empty request (just message type byte)
    - truncated username (length > remaining data)
    - no service name field after username
    - truncated service name (length > remaining)
    - no method field after service name
    - truncated method name (length > remaining)
    - password method with no change boolean
    - password method with no password length
    - publickey method with no has_signature boolean
    - first message is not SERVICE_REQUEST
    - username >= 256 bytes (truncation to saved_user)

    ssh-auth.c branch coverage: 63.33% -> 67.27% (-13 missed)

    Co-Authored-By: Claude Opus 4.6 (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 Monday, March 23, 2026 20:49:18
    https://gitlab.synchro.net/main/sbbs/-/commit/27c8a2d516a9d53b603a6e5b
    Modified Files:
    src/ssh/test/test_auth.c
    Log Message:
    Add 12 more server auth parse and callback tests

    Password parse errors:
    - truncated password data (pw_len > remaining)
    - password change with no new_password field
    - password change with truncated new_password

    Missing callbacks:
    - password method with no password_cb (gets FAILURE, retries with none)
    - publickey method with no publickey_cb (gets FAILURE, retries with none)

    Publickey parse errors:
    - no algo length field after has_sig
    - no pubkey blob after algo name
    - has_sig=true but no signature length

    Publickey protocol:
    - unknown algo name with has_sig=true (FAILURE response)
    - key probe (has_sig=false) rejected by callback (FAILURE not PK_OK)

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

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