HomeFreeBSD

netlink: Fully clear parser state between messages

Description

netlink: Fully clear parser state between messages

Failing to reset the cookie between messages can lead to an attempt
to interpret a zeroed buffer as a struct nlattr, causing a length
calculation to underflow, resulting in a memcpy() call where the
length exceeds the actual size of the buffer.

MFC after: 1 week
PR: 283797
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D51634

(cherry picked from commit a8d90e32133b77a49c2551f22e59f72d65293b64)

Details

Provenance
desAuthored on Jul 31 2025, 10:06 AM
Reviewer
glebius
Differential Revision
D51634: netlink: Fully clear parser state between messages
Parents
rGaadc10e7ce1a: cam_fill_mmcio: initialize cmd.error sub-field
Branches
Unknown
Tags
Unknown