diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-05-06 14:52:43 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-05-06 14:20:46 +0000 |
commit | 623647821aa7c7565ed5153a27c5a1bb088efbe6 (patch) | |
tree | eaed96375851ee018c5138b00a19244a07b2c61f | |
parent | 8b2e2db6f1fe0236e585cbbb35bd319ef4d39e35 (diff) | |
download | qtwebengine-chromium-623647821aa7c7565ed5153a27c5a1bb088efbe6.tar.gz |
[Backport] Update usrsctp to 81-version (CVE-2020-6831)v5.15.0-rc2v5.15.0
Change-Id: I293add25fadc28fbb9d96ebe81bed154be5a6372
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
4 files changed, 363 insertions, 358 deletions
diff --git a/chromium/third_party/usrsctp/usrsctplib/Makefile.nmake b/chromium/third_party/usrsctp/usrsctplib/Makefile.nmake index c439c8b3a71..6f9d7014784 100644 --- a/chromium/third_party/usrsctp/usrsctplib/Makefile.nmake +++ b/chromium/third_party/usrsctp/usrsctplib/Makefile.nmake @@ -1,45 +1,45 @@ -# -# Copyright (C) 2011-2012 Michael Tuexen -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the project nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# - -all: - cd usrsctplib - nmake -f Makefile.nmake - cd .. - cd programs - nmake all -f Makefile.nmake - cd .. - -clean: - cd usrsctplib - nmake clean -f Makefile.nmake - cd .. - cd programs - nmake clean -f Makefile.nmake - cd .. +#
+# Copyright (C) 2011-2012 Michael Tuexen
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the project nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+
+all:
+ cd usrsctplib
+ nmake -f Makefile.nmake
+ cd ..
+ cd programs
+ nmake all -f Makefile.nmake
+ cd ..
+
+clean:
+ cd usrsctplib
+ nmake clean -f Makefile.nmake
+ cd ..
+ cd programs
+ nmake clean -f Makefile.nmake
+ cd ..
diff --git a/chromium/third_party/usrsctp/usrsctplib/programs/Makefile.nmake b/chromium/third_party/usrsctp/usrsctplib/programs/Makefile.nmake index f3800e22e5d..01c411cef68 100644 --- a/chromium/third_party/usrsctp/usrsctplib/programs/Makefile.nmake +++ b/chromium/third_party/usrsctp/usrsctplib/programs/Makefile.nmake @@ -1,126 +1,126 @@ -# -# Copyright (C) 2011-2012 Michael Tuexen -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the project nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# - -CFLAGS=/W3 /WX /I..\usrsctplib - -CVARSDLL=-DINET -DINET6 - -LINKFLAGS=/LIBPATH:..\usrsctplib usrsctp.lib - -.c.obj:: - $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $< - -all: \ - client \ - daytime_server \ - discard_server \ - echo_server \ - tsctp \ - rtcweb \ - ekr_client \ - ekr_server \ - ekr_peer \ - ekr_loop \ - test_libmgmt \ - http_client - -client: - $(CC) $(CFLAGS) $(CVARSDLL) -c client.c - link -out:client.exe client.obj $(LINKFLAGS) - -daytime_server: - $(CC) $(CFLAGS) $(CVARSDLL) -c daytime_server.c - link -out:daytime_server.exe daytime_server.obj $(LINKFLAGS) - -discard_server: - $(CC) $(CFLAGS) $(CVARSDLL) -c discard_server.c - link -out:discard_server.exe discard_server.obj $(LINKFLAGS) - -echo_server: - $(CC) $(CFLAGS) $(CVARSDLL) -c echo_server.c - link -out:echo_server.exe echo_server.obj $(LINKFLAGS) - -tsctp: - $(CC) $(CFLAGS) $(CVARSDLL) -c tsctp.c - link -out:tsctp.exe tsctp.obj $(LINKFLAGS) - -rtcweb: - $(CC) $(CFLAGS) $(CVARSDLL) -c rtcweb.c - link -out:rtcweb.exe rtcweb.obj $(LINKFLAGS) - -ekr_client: - $(CC) $(CFLAGS) $(CVARSDLL) -c ekr_client.c - link -out:ekr_client.exe ekr_client.obj $(LINKFLAGS) - -ekr_server: - $(CC) $(CFLAGS) $(CVARSDLL) -c ekr_server.c - link -out:ekr_server.exe ekr_server.obj $(LINKFLAGS) - -ekr_peer: - $(CC) $(CFLAGS) $(CVARSDLL) -c ekr_peer.c - link -out:ekr_peer.exe ekr_peer.obj $(LINKFLAGS) - -ekr_loop: - $(CC) $(CFLAGS) $(CVARSDLL) -c ekr_loop.c - link -out:ekr_loop.exe ekr_loop.obj $(LINKFLAGS) - -test_libmgmt: - $(CC) $(CFLAGS) $(CVARSDLL) -c test_libmgmt.c - link -out:test_libmgmt.exe test_libmgmt.obj $(LINKFLAGS) - -http_client: - $(CC) $(CFLAGS) $(CVARSDLL) -c http_client.c - link -out:http_client.exe http_client.obj $(LINKFLAGS) - -clean: - del /F client.exe - del /F client.obj - del /F daytime_server.exe - del /F daytime_server.obj - del /F discard_server.exe - del /F discard_server.obj - del /F echo_server.exe - del /F echo_server.obj - del /F tsctp.exe - del /F tsctp.obj - del /F rtcweb.exe - del /F rtcweb.obj - del /F ekr_client.exe - del /F ekr_client.obj - del /F ekr_server.exe - del /F ekr_server.obj - del /F ekr_peer.exe - del /F ekr_peer.obj - del /F ekr_loop.exe - del /F ekr_loop.obj - del /F test_libmgmt.exe - del /F test_libmgmt.obj - del /F http_client.exe - del /F http_client.obj +#
+# Copyright (C) 2011-2012 Michael Tuexen
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the project nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+
+CFLAGS=/W3 /WX /I..\usrsctplib
+
+CVARSDLL=-DINET -DINET6
+
+LINKFLAGS=/LIBPATH:..\usrsctplib usrsctp.lib
+
+.c.obj::
+ $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
+
+all: \
+ client \
+ daytime_server \
+ discard_server \
+ echo_server \
+ tsctp \
+ rtcweb \
+ ekr_client \
+ ekr_server \
+ ekr_peer \
+ ekr_loop \
+ test_libmgmt \
+ http_client
+
+client:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c client.c
+ link -out:client.exe client.obj $(LINKFLAGS)
+
+daytime_server:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c daytime_server.c
+ link -out:daytime_server.exe daytime_server.obj $(LINKFLAGS)
+
+discard_server:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c discard_server.c
+ link -out:discard_server.exe discard_server.obj $(LINKFLAGS)
+
+echo_server:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c echo_server.c
+ link -out:echo_server.exe echo_server.obj $(LINKFLAGS)
+
+tsctp:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c tsctp.c
+ link -out:tsctp.exe tsctp.obj $(LINKFLAGS)
+
+rtcweb:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c rtcweb.c
+ link -out:rtcweb.exe rtcweb.obj $(LINKFLAGS)
+
+ekr_client:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c ekr_client.c
+ link -out:ekr_client.exe ekr_client.obj $(LINKFLAGS)
+
+ekr_server:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c ekr_server.c
+ link -out:ekr_server.exe ekr_server.obj $(LINKFLAGS)
+
+ekr_peer:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c ekr_peer.c
+ link -out:ekr_peer.exe ekr_peer.obj $(LINKFLAGS)
+
+ekr_loop:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c ekr_loop.c
+ link -out:ekr_loop.exe ekr_loop.obj $(LINKFLAGS)
+
+test_libmgmt:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c test_libmgmt.c
+ link -out:test_libmgmt.exe test_libmgmt.obj $(LINKFLAGS)
+
+http_client:
+ $(CC) $(CFLAGS) $(CVARSDLL) -c http_client.c
+ link -out:http_client.exe http_client.obj $(LINKFLAGS)
+
+clean:
+ del /F client.exe
+ del /F client.obj
+ del /F daytime_server.exe
+ del /F daytime_server.obj
+ del /F discard_server.exe
+ del /F discard_server.obj
+ del /F echo_server.exe
+ del /F echo_server.obj
+ del /F tsctp.exe
+ del /F tsctp.obj
+ del /F rtcweb.exe
+ del /F rtcweb.obj
+ del /F ekr_client.exe
+ del /F ekr_client.obj
+ del /F ekr_server.exe
+ del /F ekr_server.obj
+ del /F ekr_peer.exe
+ del /F ekr_peer.obj
+ del /F ekr_loop.exe
+ del /F ekr_loop.obj
+ del /F test_libmgmt.exe
+ del /F test_libmgmt.obj
+ del /F http_client.exe
+ del /F http_client.obj
diff --git a/chromium/third_party/usrsctp/usrsctplib/usrsctplib/Makefile.nmake b/chromium/third_party/usrsctp/usrsctplib/usrsctplib/Makefile.nmake index e16dc1e7875..48d2bd110c7 100644 --- a/chromium/third_party/usrsctp/usrsctplib/usrsctplib/Makefile.nmake +++ b/chromium/third_party/usrsctp/usrsctplib/usrsctplib/Makefile.nmake @@ -1,179 +1,179 @@ -# -# Copyright (C) 2011-2012 Michael Tuexen -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the project nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# - -CFLAGS=/I. /W3 /WX - -CVARSDLL=-DSCTP_DEBUG -DSCTP_SIMPLE_ALLOCATOR -DSCTP_PROCESS_LEVEL_LOCKS -CVARSDLL=$(CVARSDLL) -D__Userspace__ -D__Userspace_os_Windows -CVARSDLL=$(CVARSDLL) -DINET -DINET6 -CVARSDLL=$(CVARSDLL) -D_LIB - -LINKFLAGS=/LIBPATH:. Ws2_32.lib - -usrsctp_OBJECTS = \ - user_environment.obj \ - user_mbuf.obj \ - user_recv_thread.obj \ - user_socket.obj \ - sctp_asconf.obj \ - sctp_auth.obj \ - sctp_bsd_addr.obj \ - sctp_callout.obj \ - sctp_cc_functions.obj \ - sctp_crc32.obj \ - sctp_indata.obj \ - sctp_input.obj \ - sctp_output.obj \ - sctp_pcb.obj \ - sctp_peeloff.obj \ - sctp_sha1.obj \ - sctp_ss_functions.obj \ - sctp_sysctl.obj \ - sctp_timer.obj \ - sctp_userspace.obj \ - sctp_usrreq.obj \ - sctputil.obj \ - sctp6_usrreq.obj - -usrsctp_HEADERS = \ - user_atomic.h \ - user_environment.h \ - user_inpcb.h \ - user_ip6_var.h \ - user_malloc.h \ - user_mbuf.h \ - user_recv_thread.h \ - user_route.h \ - user_socketvar.h \ - user_uma.h \ - user_queue.h \ - user_ip_icmp.h \ - user_ip6_var.h \ - netinet\sctp.h \ - netinet\sctp_asconf.h \ - netinet\sctp_auth.h \ - netinet\sctp_bsd_addr.h \ - netinet\sctp_callout.h \ - netinet\sctp_constants.h \ - netinet\sctp_crc32.h \ - netinet\sctp_header.h \ - netinet\sctp_indata.h \ - netinet\sctp_input.h \ - netinet\sctp_lock_userspace.h \ - netinet\sctp_os.h \ - netinet\sctp_os_userspace.h \ - netinet\sctp_output.h \ - netinet\sctp_pcb.h \ - netinet\sctp_peeloff.h \ - netinet\sctp_process_lock.h \ - netinet\sctp_sha1.h \ - netinet\sctp_structs.h \ - netinet\sctp_sysctl.h \ - netinet\sctp_timer.h \ - netinet\sctp_uio.h \ - netinet\sctp_var.h \ - netinet\sctputil.h \ - netinet6\sctp6_var.h - -usrsctp.lib : $(usrsctp_OBJECTS) - lib /out:usrsctp.lib $(LINKFLAGS) $(usrsctp_OBJECTS) - -user_environment.obj : user_environment.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c user_environment.c - -user_mbuf.obj : user_mbuf.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c user_mbuf.c - -user_recv_thread.obj: user_recv_thread.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c user_recv_thread.c - -user_socket.obj : user_socket.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c user_socket.c - -sctp_asconf.obj : netinet\sctp_asconf.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_asconf.c - -sctp_auth.obj : netinet\sctp_auth.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_auth.c - -sctp_bsd_addr.obj : netinet\sctp_bsd_addr.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_bsd_addr.c - -sctp_callout.obj : netinet\sctp_callout.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_callout.c - -sctp_cc_functions.obj : netinet\sctp_cc_functions.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_cc_functions.c - -sctp_crc32.obj : netinet\sctp_crc32.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_crc32.c - -sctp_indata.obj : netinet\sctp_indata.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_indata.c - -sctp_input.obj : netinet\sctp_input.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_input.c - -sctp_output.obj : netinet\sctp_output.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_output.c - -sctp_pcb.obj : netinet\sctp_pcb.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_pcb.c - -sctp_peeloff.obj : netinet\sctp_peeloff.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_peeloff.c - -sctp_sha1.obj : netinet\sctp_sha1.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_sha1.c - -sctp_ss_functions.obj : netinet\sctp_ss_functions.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_ss_functions.c - -sctp_sysctl.obj : netinet\sctp_sysctl.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_sysctl.c - -sctp_timer.obj : netinet\sctp_timer.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_timer.c - -sctp_userspace.obj : netinet\sctp_userspace.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_userspace.c - -sctp_usrreq.obj : netinet\sctp_usrreq.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_usrreq.c - -sctputil.obj : netinet\sctputil.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet\sctputil.c - -sctp6_usrreq.obj : netinet6\sctp6_usrreq.c $(usrsctp_HEADERS) - cl $(CVARSDLL) $(CFLAGS) -c netinet6\sctp6_usrreq.c - -clean: - del *.obj - del usrsctp.lib +#
+# Copyright (C) 2011-2012 Michael Tuexen
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the project nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+
+CFLAGS=/I. /W3 /WX
+
+CVARSDLL=-DSCTP_DEBUG -DSCTP_SIMPLE_ALLOCATOR -DSCTP_PROCESS_LEVEL_LOCKS
+CVARSDLL=$(CVARSDLL) -D__Userspace__ -D__Userspace_os_Windows
+CVARSDLL=$(CVARSDLL) -DINET -DINET6
+CVARSDLL=$(CVARSDLL) -D_LIB
+
+LINKFLAGS=/LIBPATH:. Ws2_32.lib
+
+usrsctp_OBJECTS = \
+ user_environment.obj \
+ user_mbuf.obj \
+ user_recv_thread.obj \
+ user_socket.obj \
+ sctp_asconf.obj \
+ sctp_auth.obj \
+ sctp_bsd_addr.obj \
+ sctp_callout.obj \
+ sctp_cc_functions.obj \
+ sctp_crc32.obj \
+ sctp_indata.obj \
+ sctp_input.obj \
+ sctp_output.obj \
+ sctp_pcb.obj \
+ sctp_peeloff.obj \
+ sctp_sha1.obj \
+ sctp_ss_functions.obj \
+ sctp_sysctl.obj \
+ sctp_timer.obj \
+ sctp_userspace.obj \
+ sctp_usrreq.obj \
+ sctputil.obj \
+ sctp6_usrreq.obj
+
+usrsctp_HEADERS = \
+ user_atomic.h \
+ user_environment.h \
+ user_inpcb.h \
+ user_ip6_var.h \
+ user_malloc.h \
+ user_mbuf.h \
+ user_recv_thread.h \
+ user_route.h \
+ user_socketvar.h \
+ user_uma.h \
+ user_queue.h \
+ user_ip_icmp.h \
+ user_ip6_var.h \
+ netinet\sctp.h \
+ netinet\sctp_asconf.h \
+ netinet\sctp_auth.h \
+ netinet\sctp_bsd_addr.h \
+ netinet\sctp_callout.h \
+ netinet\sctp_constants.h \
+ netinet\sctp_crc32.h \
+ netinet\sctp_header.h \
+ netinet\sctp_indata.h \
+ netinet\sctp_input.h \
+ netinet\sctp_lock_userspace.h \
+ netinet\sctp_os.h \
+ netinet\sctp_os_userspace.h \
+ netinet\sctp_output.h \
+ netinet\sctp_pcb.h \
+ netinet\sctp_peeloff.h \
+ netinet\sctp_process_lock.h \
+ netinet\sctp_sha1.h \
+ netinet\sctp_structs.h \
+ netinet\sctp_sysctl.h \
+ netinet\sctp_timer.h \
+ netinet\sctp_uio.h \
+ netinet\sctp_var.h \
+ netinet\sctputil.h \
+ netinet6\sctp6_var.h
+
+usrsctp.lib : $(usrsctp_OBJECTS)
+ lib /out:usrsctp.lib $(LINKFLAGS) $(usrsctp_OBJECTS)
+
+user_environment.obj : user_environment.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c user_environment.c
+
+user_mbuf.obj : user_mbuf.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c user_mbuf.c
+
+user_recv_thread.obj: user_recv_thread.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c user_recv_thread.c
+
+user_socket.obj : user_socket.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c user_socket.c
+
+sctp_asconf.obj : netinet\sctp_asconf.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_asconf.c
+
+sctp_auth.obj : netinet\sctp_auth.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_auth.c
+
+sctp_bsd_addr.obj : netinet\sctp_bsd_addr.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_bsd_addr.c
+
+sctp_callout.obj : netinet\sctp_callout.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_callout.c
+
+sctp_cc_functions.obj : netinet\sctp_cc_functions.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_cc_functions.c
+
+sctp_crc32.obj : netinet\sctp_crc32.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_crc32.c
+
+sctp_indata.obj : netinet\sctp_indata.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_indata.c
+
+sctp_input.obj : netinet\sctp_input.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_input.c
+
+sctp_output.obj : netinet\sctp_output.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_output.c
+
+sctp_pcb.obj : netinet\sctp_pcb.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_pcb.c
+
+sctp_peeloff.obj : netinet\sctp_peeloff.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_peeloff.c
+
+sctp_sha1.obj : netinet\sctp_sha1.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_sha1.c
+
+sctp_ss_functions.obj : netinet\sctp_ss_functions.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_ss_functions.c
+
+sctp_sysctl.obj : netinet\sctp_sysctl.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_sysctl.c
+
+sctp_timer.obj : netinet\sctp_timer.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_timer.c
+
+sctp_userspace.obj : netinet\sctp_userspace.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_userspace.c
+
+sctp_usrreq.obj : netinet\sctp_usrreq.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctp_usrreq.c
+
+sctputil.obj : netinet\sctputil.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet\sctputil.c
+
+sctp6_usrreq.obj : netinet6\sctp6_usrreq.c $(usrsctp_HEADERS)
+ cl $(CVARSDLL) $(CFLAGS) -c netinet6\sctp6_usrreq.c
+
+clean:
+ del *.obj
+ del usrsctp.lib
diff --git a/chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c b/chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c index c62bb8506dc..4e53dfb27ec 100755 --- a/chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c +++ b/chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c @@ -2178,7 +2178,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, int init_offset, initack_offset, initack_limit; int retval; int error = 0; - uint8_t auth_chunk_buf[SCTP_PARAM_BUFFER_SIZE]; + uint8_t auth_chunk_buf[SCTP_CHUNK_BUFFER_SIZE]; #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; @@ -2373,8 +2373,11 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, if (auth_skipped) { struct sctp_auth_chunk *auth; - auth = (struct sctp_auth_chunk *) - sctp_m_getptr(m, auth_offset, auth_len, auth_chunk_buf); + if (auth_len <= SCTP_CHUNK_BUFFER_SIZE) { + auth = (struct sctp_auth_chunk *)sctp_m_getptr(m, auth_offset, auth_len, auth_chunk_buf); + } else { + auth = NULL; + } if ((auth == NULL) || sctp_handle_auth(stcb, auth, m, auth_offset)) { /* auth HMAC failed, dump the assoc and packet */ SCTPDBG(SCTP_DEBUG_AUTH1, @@ -4846,11 +4849,13 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, if (auth_skipped && (stcb != NULL)) { struct sctp_auth_chunk *auth; - auth = (struct sctp_auth_chunk *) - sctp_m_getptr(m, auth_offset, - auth_len, chunk_buf); - got_auth = 1; - auth_skipped = 0; + if (auth_len <= SCTP_CHUNK_BUFFER_SIZE) { + auth = (struct sctp_auth_chunk *)sctp_m_getptr(m, auth_offset, auth_len, chunk_buf); + got_auth = 1; + auth_skipped = 0; + } else { + auth = NULL; + } if ((auth == NULL) || sctp_handle_auth(stcb, auth, m, auth_offset)) { /* auth HMAC failed so dump it */ |