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")

(cherry picked from commit 64327f769cee0c26e1b81e6195a5092498b10403)

Details

Provenance
kpAuthored on May 21 2026, 8:13 AM
Parents
rG6524505fd4f9: rc: virtual_oss: Create a loopback device in the default configuration
Branches
Unknown
Tags
Unknown