I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
21 lines
608 B
Diff
21 lines
608 B
Diff
--- sys/netinet6/sctp6_usrreq.c.orig
|
|
+++ sys/netinet6/sctp6_usrreq.c
|
|
@@ -379,7 +379,6 @@
|
|
* XXX: We assume that when IPV6 is non NULL, M and OFF are
|
|
* valid.
|
|
*/
|
|
- /* check if we can safely examine src and dst ports */
|
|
struct sctp_inpcb *inp = NULL;
|
|
struct sctp_tcb *stcb = NULL;
|
|
struct sctp_nets *net = NULL;
|
|
@@ -388,6 +387,10 @@
|
|
if (ip6cp->ip6c_m == NULL)
|
|
return;
|
|
|
|
+ /* Check if we can safely examine the SCTP header. */
|
|
+ if (ip6cp->ip6c_m->m_pkthdr.len < ip6cp->ip6c_off + sizeof(sh))
|
|
+ return;
|
|
+
|
|
bzero(&sh, sizeof(sh));
|
|
bzero(&final, sizeof(final));
|
|
inp = NULL;
|