Skip to content
  • Kristof Provost's avatar
    if_stf: KASAN fix · 439da7f0
    Kristof Provost authored
    In in_stf_input() we grabbed a pointer to the IPv4 header and later did
    an m_pullup() before we look at the IPv6 header. However, m_pullup()
    could rearrange the mbuf chain and potentially invalidate the pointer to
    the IPv4 header.
    
    Avoid this issue by copying the IP header rather than getting a pointer
    to it.
    
    Reported by:	markj, Jenkins (KASAN job)
    Reviewed by:	markj
    MFC after:	1 week
    Sponsored by:	Rubicon Communications, LLC ("Netgate")
    Differential Revision:	https://reviews.freebsd.org/D33192
    439da7f0