HomeFreeBSD

pf: fix incorrect table decoding in netlink

Description

pf: fix incorrect table decoding in netlink

We used nla_p_table for pfr_table structures, but this netlink decoder
was intended for pfioc_table and decoded an extra field, outside
of pfr_table. This allowed userspace to write (slightly) outside of
pfr_table.

Use a separate nlattr_parser for pfr_table.

PR: 295218
Reported by: Robert Morris <rtm@lcs.mit.edu>
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Details

Provenance
kpAuthored on May 21 2026, 8:13 AM
Parents
rGad3d7666e00b: BSD.tests.dist: Add the new sys/mac/do directory
Branches
Unknown
Tags
Unknown