[haiku-commits] haiku: hrev47472 - src/system/kernel/arch/x86

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 8 Jul 2014 21:30:53 +0200 (CEST)

hrev47472 adds 1 changeset to branch 'master'
old head: 819b454750bfac97f44c156e7e0fdb9683406ab8
new head: d229332a33feb23d9ca9f3869ec7c4e4b09a990f
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=d229332+%5E819b454

----------------------------------------------------------------------------

d229332: 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 <mmlr@xxxxxxxx>

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev47472
Commit:      d229332a33feb23d9ca9f3869ec7c4e4b09a990f
URL:         http://cgit.haiku-os.org/haiku/commit/?id=d229332
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Thu Jul  3 16:31:20 2014 UTC
Committer:   Michael Lotz <mmlr@xxxxxxxx>
Commit-Date: Tue Jul  8 18:39:37 2014 UTC

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 1 deletion(-)
src/system/kernel/arch/x86/msi.cpp | 2 +-

----------------------------------------------------------------------------

diff --git a/src/system/kernel/arch/x86/msi.cpp 
b/src/system/kernel/arch/x86/msi.cpp
index 4578e14..64dc74a 100644
--- a/src/system/kernel/arch/x86/msi.cpp
+++ b/src/system/kernel/arch/x86/msi.cpp
@@ -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;
        }


Other related posts:

  • » [haiku-commits] haiku: hrev47472 - src/system/kernel/arch/x86 - mmlr