HomeFreeBSD

ipfw: Fix segfault in NPTv6 rule parser

Description

ipfw: Fix segfault in NPTv6 rule parser

If the user specified a prefix length with either the internal or
external prefix, we'd jump to check_prefix where we'd dereference p
which was most likely uninitialized.

Instead, store the various prefix lengths separately and check them
all after the loop.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D50597

(cherry picked from commit 64bc9ac8cd9a42259aeb1715d4e14902aa83fcac)

Details

Provenance
p.mousavizadeh_protonmail.comAuthored on Aug 21 2025, 5:40 PM
desCommitted on Sep 4 2025, 6:15 PM
Differential Revision
D50597: ipfw: prefixlen segfault bugfix in nptv6
Parents
rG2e25db21976b: date(1): Improve manpage around '-I'
Branches
Unknown
Tags
Unknown