CIDs 1162783 & 1162784: out-of-bounds access & write in MSI.

* The number of IO vectors is not 256 on x86, but rather 224 as set by
  NUM_IO_VECTORS in "arch_int.h".
* Jessicah mentioned hearing about MSI crashes before, but that was a
  few weeks ago.
* These were the only CIDs in the MSI code.

Signed-off-by: Michael Lotz <[email protected]>
This commit is contained in:
Augustin Cavalier
2014-07-08 20:39:37 +02:00
committed by Michael Lotz
parent 819b454750
commit d229332a33
+1 -1
View File
@@ -57,7 +57,7 @@ msi_allocate_vectors(uint8 count, uint8 *startVector, uint64 *address,
if (result != B_OK)
return result;
if (vector >= 256) {
if (vector >= NUM_IO_VECTORS) {
free_io_interrupt_vectors(count, vector);
return B_NO_MEMORY;
}