Skip to content

Memory errors uncovered by fuzzing #19

@erkyrath

Description

@erkyrath

Lionel Debroux did a round of testing glulxe with deliberately corrupted game files and uncovered a variety of memory handling errors.

I'm not attaching all the data files from the run, for they are large. But here is the uniqued list of crash points:

   2     #0 0x437a90 in fread (.../glulxe/glulxe/glulxe+0x437a90)
  64     #0 0x4971cd in free (.../glulxe/glulxe/glulxe+0x4971cd)
   1     #0 0x4973e9 in malloc (.../glulxe/glulxe/glulxe+0x4973e9)
 265     #0 0x49744d in malloc (.../glulxe/glulxe/glulxe+0x49744d)
   2     #0 0x49fbf0 in __sanitizer::BufferedStackTrace::UnwindImpl(unsigned long, unsigned long, void*, bool, unsigned int) (.../glulxe/glulxe/glulxe+0x49fbf0)
   1     #0 0x4a2e00 in __asan::GetCurrentThread() (.../glulxe/glulxe/glulxe+0x4a2e00)
   1     #0 0x4b7584 in __sanitizer::StackDepotBase<__sanitizer::StackDepotNode, 1, 20>::Put(__sanitizer::StackTrace, bool*) (.../glulxe/glulxe/glulxe+0x4b7584)
   1     #0 0x4b7590 in __sanitizer::StackDepotBase<__sanitizer::StackDepotNode, 1, 20>::Put(__sanitizer::StackTrace, bool*) (.../glulxe/glulxe/glulxe+0x4b7590)
  16     #0 0x4c9a3c in pop_arguments .../glulxe/glulxe/vm.c:310:19
   8     #0 0x4c9a94 in pop_arguments .../glulxe/glulxe/vm.c:310:19
  39     #0 0x4c9b69 in pop_arguments .../glulxe/glulxe/vm.c:310:17
  16     #0 0x4c9d5f in pop_arguments .../glulxe/glulxe/vm.c:310:17
   1     #0 0x4d2dee in execute_loop .../glulxe/glulxe/exec.c:524:19
   1     #0 0x4d3b00 in enter_function .../glulxe/glulxe/funcs.c:64:5
   6     #0 0x4d588f in enter_function .../glulxe/glulxe/funcs.c:63:5
   9     #0 0x4d5c82 in pop_callstub .../glulxe/glulxe/funcs.c:231:17
  17     #0 0x4d5d31 in pop_callstub .../glulxe/glulxe/funcs.c:240:29
   2     #0 0x4d8065  (.../glulxe/glulxe/glulxe+0x4d8065)
 398     #0 0x4d8065 in parse_operands .../glulxe/glulxe/operand.c:427:19
   1     #0 0x4d8ed8 in parse_operands .../glulxe/glulxe/operand.c:433:19
 207     #0 0x4d939c in parse_operands .../glulxe/glulxe/operand.c:427:19
   1     #0 0x4d93c7 in parse_operands .../glulxe/glulxe/operand.c:430:19
 120     #0 0x4d95b0 in store_operand .../glulxe/glulxe/operand.c:555:5
  94     #0 0x4d9769 in store_operand .../glulxe/glulxe/operand.c:555:5
   2     #0 0x4d9c12 in store_operand_b .../glulxe/glulxe/operand.c:619:5
   1     #0 0x5099e7  (.../glulxe/glulxe/glulxe+0x5099e7)
  64     #0 0x5099e7 in glk_stream_open_file_uni .../glulxe/cheapglk/cgstream.c:317:18
   1     #0 0x50b15d in glk_stream_set_position .../glulxe/cheapglk/cgstream.c:520:18
   1     #0 0x516cde in gli_buffer_change_case .../glulxe/cheapglk/cgunicod.c:234:21
  10     #0 0x517c69 in gli_buffer_change_case .../glulxe/cheapglk/cgunicod.c:234:21
  79     #0 0x519dac in gli_buffer_canon_decompose_uni .../glulxe/cheapglk/cgunicod.c:368:21
   2     #0 0x52e30d in giblorb_initialize_map .../glulxe/cheapglk/gi_blorb.c:291:38
   1     #0 0x52e382 in giblorb_initialize_map .../glulxe/cheapglk/gi_blorb.c:264:26

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions