DragonFlyBSD Kernel Audit
DF-0088 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c
--- a/sys/kern/subr_unit.c
+++ b/sys/kern/subr_unit.c
@@ -553,9 +553,11 @@
 	struct unrb *ub;
 	u_int pl;
 
-	KASSERT(item >= uh->low && item <= uh->high,
-	    ("UNR: free_unr(%u) out of range [%u...%u]",
-	     item, uh->low, uh->high));
+	if (item < uh->low || item > uh->high) {
+		kprintf("UNR: free_unr(%u) out of range [%u...%u]\n",
+		    item, uh->low, uh->high);
+		return;
+	}
 	check_unrhdr(uh, __LINE__);
 	item -= uh->low;
 	upp = TAILQ_FIRST(&uh->head);