[Midnightbsd-cvs] src [7419] trunk: TCP MD5 signature denial of service

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Jan 14 08:16:42 EST 2016


Revision: 7419
          http://svnweb.midnightbsd.org/src/?rev=7419
Author:   laffer1
Date:     2016-01-14 08:14:41 -0500 (Thu, 14 Jan 2016)
Log Message:
-----------
 TCP MD5 signature denial of service

        A programming error in processing a TCP connection with both TCP_MD5SIG
        and TCP_NOOPT socket options may lead to kernel crash.

Modified Paths:
--------------
    trunk/UPDATING
    trunk/sys/netinet/tcp_output.c

Modified: trunk/UPDATING
===================================================================
--- trunk/UPDATING	2016-01-14 13:13:04 UTC (rev 7418)
+++ trunk/UPDATING	2016-01-14 13:14:41 UTC (rev 7419)
@@ -3,8 +3,11 @@
 20160114:
 	Fix security on bsnmpd configuration file during installation.
 
-	
+	TCP MD5 signature denial of service
 
+	A programming error in processing a TCP connection with both TCP_MD5SIG
+	and TCP_NOOPT socket options may lead to kernel crash.
+
 20160102:
 	Happy New Year
 

Modified: trunk/sys/netinet/tcp_output.c
===================================================================
--- trunk/sys/netinet/tcp_output.c	2016-01-14 13:13:04 UTC (rev 7418)
+++ trunk/sys/netinet/tcp_output.c	2016-01-14 13:14:41 UTC (rev 7419)
@@ -676,8 +676,8 @@
 	 * segments.  Options for SYN-ACK segments are handled in TCP
 	 * syncache.
 	 */
+	to.to_flags = 0;
 	if ((tp->t_flags & TF_NOOPT) == 0) {
-		to.to_flags = 0;
 		/* Maximum segment size. */
 		if (flags & TH_SYN) {
 			tp->snd_nxt = tp->iss;
@@ -1047,7 +1047,7 @@
 		tp->snd_up = tp->snd_una;		/* drag it along */
 
 #ifdef TCP_SIGNATURE
-	if (tp->t_flags & TF_SIGNATURE) {
+	if (to.to_flags & TOF_SIGNATURE) {
 		int sigoff = to.to_signature - opt;
 		tcp_signature_compute(m, 0, len, optlen,
 		    (u_char *)(th + 1) + sigoff, IPSEC_DIR_OUTBOUND);
@@ -1456,6 +1456,7 @@
 			bcopy((u_char *)&to->to_tsecr, optp, sizeof(to->to_tsecr));
 			optp += sizeof(to->to_tsecr);
 			break;
+#ifdef TCP_SIGNATURE
 		case TOF_SIGNATURE:
 			{
 			int siglen = TCPOLEN_SIGNATURE - 2;
@@ -1474,6 +1475,7 @@
 				 *optp++ = 0;
 			break;
 			}
+#endif
 		case TOF_SACK:
 			{
 			int sackblks = 0;



More information about the Midnightbsd-cvs mailing list