⬢ DragonFlyBSD Kernel Audit
DF-3442 / fix.diff
← back to finding ↓ download raw
--- a/sys/net/ipfw3_basic/ip_fw3.c (rule loader)
+++ validate O_IFNAME-family instructions at rule load
+	{
+		ipfw_insn_if *cmd = (ipfw_insn_if *)insn;
+		int t;
+		for (t = 0; t < IFNAMSIZ; t++)
+			if (cmd->name[t] == '\0')
+				break;
+		if (t == IFNAMSIZ)
+			return EINVAL;	/* DF-3442: require termination */
+	}