aboutsummaryrefslogtreecommitdiff
path: root/bin/test/(developers-only)
diff options
context:
space:
mode:
authorR. Christian McDonald <rcm@FreeBSD.org>2026-10-11 20:46:56 +0000
committerR. Christian McDonald <rcm@FreeBSD.org>2026-10-11 23:58:48 +0000
commit5180fce1cf7ec7430ccf2adb88358602e5ccee1e (patch)
tree2831c8ec67bb1781c67604783f32cf4deaa9779c /bin/test/(developers-only)
parente8b58993ff5d31fa964741d8e37c0f1a3e549095 (diff)
netlink: Make room for the unfinished message when growing the bufferHEADmain
When a message outgrows the writer's buffer, _nlmsg_refill_buffer() allocates a larger one and moves the unfinished message there. The new buffer was sized for the data about to be added alone, so with enough of the message already written the caller wrote past its end and left it with datalen > buflen. A 20-byte message plus an attribute of 8176 bytes got a buffer of 8192 bytes for 8200 bytes of data, and reading it panicked an INVARIANTS kernel in nl_soreceive(). Size the new buffer for both, and add a ktest for it. Reviewed by: glebius Fixes: 7e5bf68495cc ("netlink: add netlink support") MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D60541
Diffstat (limited to 'bin/test/(developers-only)')
0 files changed, 0 insertions, 0 deletions