⬢ DragonFlyBSD Kernel Audit
DF-3393 / fix.diff
← back to finding ↓ download raw
--- a/sys/net/radix.c
+++ b/sys/net/radix.c
@@ -306-329 rn_match()
 	if (t->rn_mask != NULL)
 		klen = clen(t->rn_mask);
 	else
-		klen = clen(key);
+		klen = MIN(clen(key), clen(t->rn_key));	/* DF-3393: never
+							 * read past the
+							 * stored key */