HomeFreeBSD

pfctl: fix possible out-of-bounds read

Description

pfctl: fix possible out-of-bounds read

Tags in $10 (filter_opts) are not guaranteed to be the maximum possible
tag length, so memcpy() can end up reading outside of the allocated
buffer.

Use strlcpy() instead.

Reported by: CheriBSD
Event: Kitchener-Waterloo Hackathon 202406

Details

Provenance
kpAuthored on Wed, Jun 5, 9:55 PM
Parents
rG8f04209d37ec: pf: simplify pf_addrcpy() and pf_match_addr()
Branches
Unknown
Tags
Unknown