HomeFreeBSD

pf: fix overly large copy in pf_rule_to_krule()

Description

pf: fix overly large copy in pf_rule_to_krule()

The timeout array in struct pf_rule has PFTM_OLD_MAX entries, the one in
struct pf_krule has PFTM_MAX entries (and PFTM_MAX > PFTM_OLD_MAX).
Use the smaller of the sizes when copying.

Reported by: CheriBSD
MFC after: 1 week
Event: Kitchener-Waterloo Hackathon 202406

(cherry picked from commit 4779b16fa61f858ad5c449834f550fbd5e162d98)

Details

Provenance
kpAuthored on Jun 4 2024, 12:55 PM
Parents
rG154dd1eaa643: vnet tests: check for if_bridge.ko
Branches
Unknown
Tags
Unknown