HomeFreeBSD

netlink: cope with growing requests

Description

netlink: cope with growing requests

If a request ends up growing beyong the initially allocated space the
netlink functions (such as snl_add_msg_attr_u32()) will allocate a
new buffer. This invalidates the header pointer we can have received
from snl_create_msg_request(). Always use the hdr returned by
snl_finalize_msg().

Reviewed by: melifaro
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D42223

Details

Provenance
kpAuthored on Oct 16 2023, 9:48 AM
Reviewer
melifaro
Differential Revision
D42223: netlink: cope with growing requests
Parents
rGfad5734995e3: netlink: descend into nested parsers when verifying
Branches
Unknown
Tags
Unknown