DragonFlyBSD Kernel Audit
DF-1189 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/raid/ciss/ciss.c b/sys/dev/raid/ciss/ciss.c
--- a/sys/dev/raid/ciss/ciss.c
+++ b/sys/dev/raid/ciss/ciss.c
@@ -3930,6 +3930,12 @@
 
     bus		= cn->device.physical.bus;
     target	= cn->data.logical_status.logical_drive;
+    if (bus < 0 || bus > sc->ciss_max_logical_bus ||
+        target < 0 || target >= CISS_MAX_LOGICAL) {
+	ciss_printf(sc, "ignoring notify for out-of-range logical drive "
+		    "(bus %d target %d)\n", bus, target);
+	return;
+    }
     ld		= &sc->ciss_logical[bus][target];
 
     switch (cn->subclass) {