Author: tuexen Date: Sat Mar 23 09:56:41 2019 New Revision: 345441 URL: https://svnweb.freebsd.org/changeset/base/345441
Log: Fix a KASSERT() in tcp_output(). When checking the length of the headers at this point, the IP level options have not been added to the mbuf chain. So don't take them into account. Reported by: syzbot+16025fff7ee5f7c59...@syzkaller.appspotmail.com Reported by: syzbot+adb5836b8a9ff621b...@syzkaller.appspotmail.com Reported by: syzbot+d25a5352bcdf40acd...@syzkaller.appspotmail.com Reviewed by: rrs@ MFC after: 3 days Sponsored by: Netflix, Inc. Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Sat Mar 23 07:07:44 2019 (r345440) +++ head/sys/netinet/tcp_output.c Sat Mar 23 09:56:41 2019 (r345441) @@ -1284,15 +1284,9 @@ send: m->m_pkthdr.tso_segsz = tp->t_maxseg - optlen; } -#if defined(IPSEC) || defined(IPSEC_SUPPORT) - KASSERT(len + hdrlen + ipoptlen - ipsec_optlen == m_length(m, NULL), - ("%s: mbuf chain shorter than expected: %d + %u + %u - %u != %u", - __func__, len, hdrlen, ipoptlen, ipsec_optlen, m_length(m, NULL))); -#else - KASSERT(len + hdrlen + ipoptlen == m_length(m, NULL), - ("%s: mbuf chain shorter than expected: %d + %u + %u != %u", - __func__, len, hdrlen, ipoptlen, m_length(m, NULL))); -#endif + KASSERT(len + hdrlen == m_length(m, NULL), + ("%s: mbuf chain shorter than expected: %d + %u != %u", + __func__, len, hdrlen, m_length(m, NULL))); #ifdef TCP_HHOOK /* Run HHOOK_TCP_ESTABLISHED_OUT helper hooks. */ _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"