• src/sbbs3/mailsrvr.c

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wed Nov 1 15:23:13 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/f689169a82124f18d5e4ccd9
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Close socket after logging the "REFUSED SESSION from blacklisted server" msg

    Fixes issue #670

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wed Dec 13 19:11:22 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/a35cb08fb0a5f69bbe11f010
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Better resource (e.g. client thread) management

    My mail server was suddenly and inexplicably creating thousands of SMTPS
    client threads, each with a unique remote IP address, and each eventually failing with the rather obscure log message (from cryptlib):
    dbg 'Cannot read item from object' (-41) setting session active

    Eventually (after not long, really), the server would run out of resources
    and fail in weird and wonderful ways (can't malloc, can't create JS runtime
    or context, etc.). The max_clients limit (100, as I have it set) wasn't being effectively-imposed on SMTPS connections.

    The root-cause: the active_clients (counter) wasn't incremented until *after* the cryptlib/TLS setup for SMTPS connections and SMTPS/TLS connections can
    take a long time to fail, resulting in a vulnerability to an effective denial of service attack.

    Raise the minimum severity of all cryptlib/TLS log messages from Debug to
    Info.

    Create wrappers for smtp_thread() [now smtp_client_thread()] and pop3_thread [now pop3_client_thread()] that handle basic resource management (thread counters, active client counters, the client socket).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wed Dec 13 22:26:09 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/7d9c8624f7d9c5e0fd1cd5a7
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Fix extra decrement of active_clients (added in previous commit)

    And fix some use of CRYPT_UNUSED instead of cryptlib session ID.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Thu Dec 14 16:39:05 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/f43e852a170d27afdf6e33a4
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    SMTP mail server wasn't RFC 4954 compliant for "AUTH PLAIN" logins

    The base64-encoded credentials can either be supplied with the AUTH PLAIN command or in response to a 334 server-challenge. We only supported the
    former form and logged a warning ("Missing AUTH PLAIN argument") when we received the latter. No warning is logged now and the appropriate server-challege is sent and the response accepted and base64-decoded and
    parsed as before.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sat Dec 16 23:31:15 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/952a25f17aa96355e4c92e95
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    More commonization of "CLIENT BLOCKED" log messages

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Mon Jan 22 19:40:40 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/62b866c243d9a8201c55b6fa
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    If cryptInit() fails, just disable TLS support

    But continue initializing/running for other non-TLS protocol support.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Feb 7 14:00:48 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/fa5ae01239d3488112dae489
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Some more printf formats... mostly off_t but also a size_t and an time_t

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Feb 7 14:11:24 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/76055e3d35e795f4ceeefb0e
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Add missing header?

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Feb 7 14:20:25 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/f44997570fb796b34f99285f
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Aha! XP_PRIsize_t is a *size*, not a *type*.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Feb 7 14:35:39 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/aaa82ca4c9a5aac286603272
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Oh damn, this is an off_t + size_t + 1... talk about the wild west of types!

    Both long long and long are reasonable for some mixes of platforms.

    Just punt, cast the whole thing to int64_t, and forget about it.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Thu Feb 15 22:55:31 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/5cc3767eb1d56bb0db294f86
    Modified Files:
    src/sbbs3/mailsrvr.c
    Log Message:
    Use fnopen() for auto-retry when opening dnsbl_exempt.cfg for append

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