HomeFreeBSD

pf: fix use-after-free

Description

pf: fix use-after-free

If we fragment the packet in pf_route() the first transmitted packet
will free the pf_mtag we have stored in pf_pdesc (pd). Ensure we
update that pointer for every packet to avoid using a freed pointer in
pf_dummynet_route().

Reported by: CI KASAN, markj
MFC after: 1 week

(cherry picked from commit a1ecbc57011758257b85c3e9f51efc93ac93169d)

Details

Provenance
kpAuthored on Mar 23 2024, 4:02 PM
Parents
rG71f16d2efe7e: nfsd.8: Document ways to minimize Copy operation times
Branches
Unknown
Tags
Unknown