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+16025fff7ee5f7c5957b@syzkaller.appspotmail.com Reported by: syzbot+adb5836b8a9ff621b2aa@syzkaller.appspotmail.com Reported by: syzbot+d25a5352bcdf40acdbb8@syzkaller.appspotmail.com Reviewed by: rrs@ MFC after: 3 days Sponsored by: Netflix, Inc.
This commit is contained in:
parent
4ee7d3b011
commit
05fb056c06
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345441
@ -1284,15 +1284,9 @@ tcp_output(struct tcpcb *tp)
|
||||
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. */
|
||||
|
Loading…
Reference in New Issue
Block a user