HomeFreeBSD

ipfw: Update the pfil mbuf pointer in ipfw_check_frame()

Description

ipfw: Update the pfil mbuf pointer in ipfw_check_frame()

ipfw_chk() might call m_pullup() and thus can change the mbuf chain
head. In this case, the new chain head has to be returned to the pfil
hook caller, otherwise the pfil hook caller is left with a dangling
pointer.

Note that this affects only the link-layer hooks installed when the
net.link.ether.ipfw sysctl is set to 1.

Approved by: so
Security: EN-21:21.ipfw
PR: 256439, 254015, 255069, 255104
Fixes: f355cb3e6
Reviewed by: ae
Sponsored by: The FreeBSD Foundation

(cherry picked from commit bc6a2267fffeafd3946637607a74cfd639398f9d)
(cherry picked from commit ed1acef3fe3053b418ce3e41036ccf24957253a4)

Details

Provenance
markjAuthored on Jun 16 2021, 1:46 PM
Parents
rG78f91c1fbf02: Fix vlan creation for the older ifconfig(8) binaries.
Branches
Unknown
Tags
Unknown