• conio: fix heap overflow in interpolate_height after a width change

    From Andy Alt@VERT to GitLab note in main/sbbs on Wed Aug 5 09:57:40 2026
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/720#note_9931

    @Deuce after I switched video a couple times, before building with the sanitizers to debug, in the console I got

    ```
    malloc(): invalid size (unsorted)
    Aborted (core dumped)
    ```

    Posted at Andy's direction. Drafted by Claude (Opus 5), an LLM made by Anthropic.

    A SyncTERM build with the sanitizers (`make SANITIZE=1`) aborts on the X11 event thread after the window geometry changes:

    ```
    ==3646027==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7b95e28ab800
    WRITE of size 5120 at 0x7b95e28ab800 thread T3
    #0 in memcpy
    #1 in interpolate_height src/conio/scale.c:910
    #2 in do_scale src/conio/scale.c:440
    #3 in local_draw_rect src/conio/x_events.c:1384
    #4 in x11_event_thread src/conio/x_events.c:2512

    0x7b95e28ab800 is located 0 bytes after 1228800-byte region [0x7b95e277f800,0x7b95e28ab800)
    allocated by thread T3 here:
    #0 in malloc
    #1 in do_scale src/conio/scale.c:338
    #2 in local_draw_rect src/conio/x_events.c:1384
    ```

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Andy Alt@VERT to GitLab note in main/sbbs on Wed Aug 5 10:30:38 2026
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/720#note_9931

    @Deuce after I switched video (X11 -\> SDL full -\> SDL) a couple times, before building with the sanitizers to debug, in the console I got

    ```
    malloc(): invalid size (unsorted)
    Aborted (core dumped)
    ```

    Posted at Andy's direction. Drafted by Claude (Opus 5), an LLM made by Anthropic.

    A SyncTERM build with the sanitizers (`make SANITIZE=1`) aborts on the X11 event thread after the window geometry changes:

    ```
    ==3646027==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7b95e28ab800
    WRITE of size 5120 at 0x7b95e28ab800 thread T3
    #0 in memcpy
    #1 in interpolate_height src/conio/scale.c:910
    #2 in do_scale src/conio/scale.c:440
    #3 in local_draw_rect src/conio/x_events.c:1384
    #4 in x11_event_thread src/conio/x_events.c:2512

    0x7b95e28ab800 is located 0 bytes after 1228800-byte region [0x7b95e277f800,0x7b95e28ab800)
    allocated by thread T3 here:
    #0 in malloc
    #1 in do_scale src/conio/scale.c:338
    #2 in local_draw_rect src/conio/x_events.c:1384
    ```

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Andy Alt@VERT to GitLab note in main/sbbs on Wed Aug 5 11:01:19 2026
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/720#note_9934

    @Deuce btw, this is the only crash I got when NOT built with sanitize, so if you'd rather I put the other two merge requests on the master branch, let me know (they only crash when SANITIZE=1).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to GitLab note in main/sbbs on Wed Aug 5 13:12:15 2026
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/720#note_9937

    Master branch is v1.10a... if the bug is in v1.9rc4, it will need to land in syncterm-1.9 and in master if it impacts both.

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