HomeFreeBSD

MFC r353635 (by hselasky):

Description

MFC r353635 (by hselasky):

Fix panic in network stack due to use after free when receiving
partial fragmented packets before a network interface is detached.

When sending IPv4 or IPv6 fragmented packets and a fragment is lost
before the network device is freed, the mbuf making up the fragment
will remain in the temporary hashed fragment list and cause a panic
when it times out due to accessing a freed network interface
structure.

1) Make sure the m_pkthdr.rcvif always points to a valid network
interface. Else the rcvif field should be set to NULL.

2) Use the rcvif of the last received fragment as m_pkthdr.rcvif for
the fully defragged packet, instead of the first received fragment.

Details

Provenance
bzAuthored on
Parents
rS356488: o Spell "Redundancy" and "Remember" correctly.
Branches
Unknown
Tags
Unknown