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:
committed by
Michael Lotz
parent
819b454750
commit
d229332a33
@@ -57,7 +57,7 @@ msi_allocate_vectors(uint8 count, uint8 *startVector, uint64 *address,
|
|||||||
if (result != B_OK)
|
if (result != B_OK)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if (vector >= 256) {
|
if (vector >= NUM_IO_VECTORS) {
|
||||||
free_io_interrupt_vectors(count, vector);
|
free_io_interrupt_vectors(count, vector);
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user