plan9fox/sys
cinap_lenrek 36db1295be pc/pc64: fix ps2mouse memory corruption race
there was a memory corruption bug caused by us enabling the
ps2mouseputc() handler *before* initializing packetsize.

once we enabled the handler, mouse interrupts could come
in and advance the packet buffer index (nb) beyond the
buffer boundaries.

as ps2mouseputc() only checked for ++nb == packetsize, once
nb was advanced beyond the packetsize, it would continue writing
beyond the buffer and corrupt memory with each mouse packet byte.

solution is to initialize packetsize *before* enabling the
handler, and also do a >= check in ps2mouseputc() in case the
packetsize gets changed to a smaller value at runtime.
2014-09-28 18:28:38 +02:00
..
doc /sys/doc: permissions for cleanps, mkdirlist, mkfilelist 2012-10-20 19:09:54 +02:00
games/lib fortunes: $75K Prosthetic Arm Is Bricked When Paired iPod Is Stolen 2014-08-27 01:13:11 -04:00
include libsec: add diffie-hellman functions 2014-09-14 02:29:18 +02:00
lib hg: make intermediate directories like newer hg does 2014-09-15 13:42:54 -07:00
man kernel: make noswap flag exclude processes from killbig() if not eve, reset noswap flag on exec 2014-08-17 00:50:20 +02:00
src pc/pc64: fix ps2mouse memory corruption race 2014-09-28 18:28:38 +02:00