Trying to send them to the kernel crashes userv-ipif.
This is a DoS vulnerability, exposed to internal sites only.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Fix netlink SEGV on clientless netlinks (i.e. configuration error).
* Fix formatting error in p-t-p startup message.
* Additions to the test-example suite.
* Fix netlink SEGV on clientless netlinks (i.e. configuration error).
* Fix formatting error in p-t-p startup message.
* Additions to the test-example suite.
- * Fixes to MTU and fragmentation handling.
+ * SECURITY: Fixes to MTU and fragmentation handling.
+ if (buf->size > st->slip.nl.mtu) {
+ Message(M_ERR,"%s: packet of size %"PRIu32" exceeds mtu %"PRIu32":"
+ " cannot be injected into kernel, dropped\n",
+ st->slip.nl.name, buf->size, st->slip.nl.mtu);
+ BUF_FREE(buf);
+ return;
+ }
+
slip_stuff(&st->slip,buf,st->txfd);
}
slip_stuff(&st->slip,buf,st->txfd);
}