⬢ DragonFlyBSD Kernel Audit
DF-3385 / fix.diff
← back to finding ↓ download raw
--- a/sys/net/altq/altq_hfsc.c
+++ b/sys/net/altq/altq_hfsc.c
@@ -1003,7 +1003,13 @@
 		else
 			go_active = 0;
 
-		if (go_active) {
+		/*
+		 * A class without a link-sharing service curve cannot
+		 * take part in the virtual-time bookkeeping; skip it
+		 * exactly like update_vf() below does, or rtsc_min()
+		 * dereferences a NULL cl_fsc and panics.
+		 */
+		if (go_active && cl->cl_fsc != NULL) {
 			max_cl = actlist_last(cl->cl_parent->cl_actc);
 			if (max_cl != NULL) {
 				/*