sidplayfp icon indicating copy to clipboard operation
sidplayfp copied to clipboard

Buffer overflow read in keyboard.cpp

Open drfiemost opened this issue 1 year ago • 3 comments

Detected with ASan at exit after pressing ESC:

 ../src/keyboard.cpp:119:19: runtime error: load of address 0x7f6c0c1e9360 with insufficient space for an object of type 'char'
0x7f6c0c1e9360: note: pointer points here
 00 00 00 00  1b 1b 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  26 dd ff 0b
              ^ 
../src/keyboard.cpp:146:18: runtime error: load of address 0x7f6c0c1e9361 with insufficient space for an object of type 'char'
0x7f6c0c1e9361: note: pointer points here
 00 00 00  1b 1b 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  26 dd ff 0b 6c
              ^ 

drfiemost avatar Aug 13 '24 16:08 drfiemost

hmm, do you still get that? i just tried running ASan on sidplayfp as well and got no errors whatsoever

ruby-R53 avatar May 18 '25 20:05 ruby-R53

Last time I checked it still was there, but I can't see anything wrong with the code 🤷‍♂️

drfiemost avatar May 20 '25 16:05 drfiemost

huh now that's weird, either my compiler compiled it differently or i incorrectly set ASan up

ruby-R53 avatar May 20 '25 19:05 ruby-R53