Menu

#7 Fix null dereference with partial load on non-instruction

Unstable_(example)
closed
nobody
None
1
2022-11-08
2022-11-07
No

I found this by accident when doing a code golf challenge (which I then used for a challenge and explained here 😜)

When a partial instruction load or store is done on a non-instruction (e.g. the end of the .text section), SPIM will attempt to read the instruction before checking if it is NULL, resulting in a segfault.

Proof of concept:

    .text
main:
    # also sh, lb, lh, lbu, and lhu
    sb  $a0, not_an_instruction
 not_an_instruction:
    # end of file
1 Attachments

Discussion

  • James Larus

    James Larus - 2022-11-08
    • status: open --> closed
     
  • James Larus

    James Larus - 2022-11-08

    Thanks! It is fixed in the next release.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB