• src/sbbs3/netmail.cpp

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Thu Feb 19 22:53:59 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/002aa81ea984222fb9e48845
    Modified Files:
    src/sbbs3/netmail.cpp
    Log Message:
    Fix bug: wrong smb_t* passed in here

    Would cause a NULL fp to try to be used to quote the message text

    Introduced in commit f0545836096d44

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tue Sep 15 20:47:46 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/93e3598ffb0d8f368643561a
    Modified Files:
    src/sbbs3/netmail.cpp
    Log Message:
    Hold the SMB header lock across the QWK netmail data allocation

    sbbs_t::qwktonetmail() allocated message data storage without holding smb_locksmbhdr(). Every other allocation site takes it across the
    allocation; this one acquired it only indirectly, when smb_addmsghdr()
    locks internally some fifty lines later, by which point the data blocks
    had already been chosen and written.

    smb_allocdat() scans the .sda for a run of free blocks and only then
    writes their reference counts, so the window between choosing a run and claiming it spans the rest of the scan. Two writers allocating
    concurrently, one of them on this path, can settle on the same run and
    produce two messages whose data storage overlaps, which chksmb reports
    as duplicated or corrupt data records. Header allocation is unaffected,
    being done inside smb_addmsghdr() under the lock it takes itself.

    The window is far narrower under fast allocation, which seeks to EOF and
    claims the blocks immediately, so switching a mail base to that storage
    mode makes this class of error appear to stop without fixing it.

    issue #1241

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

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