tonioni / WinUAE

WinUAE Amiga emulator
http://www.winuae.net/
552 stars 90 forks source link

Bad atomic write? #309

Closed jacereda closed 1 month ago

jacereda commented 1 month ago

Looking at this:

https://github.com/tonioni/WinUAE/blob/c9af906a1c6817636e2a8cd1bc7e06cb21e73467/traps.cpp#L705

outtrap_alloc contains RTAREA_TRAP_DATA_SEND_NUM (1) entries. The code is indexing at RTAREA_TRAP_DATA_NUM (4), so it should be past the end of the array.

tonioni commented 1 month ago

I don't remember much how this mess worked (only way I found to have working UAE expansion in OS4) but this code seems to be unused. It seems to be only called from bsdsocket emulation which can't be OS4 compatible. (It has built-in TCP/IP stack that can't be replaced)

Yes, it has out of bounds access but I am not even sure what it was supposed to do :)