aboutsummaryrefslogtreecommitdiff
path: root/include/gssapi
diff options
context:
space:
mode:
authorR. Christian McDonald <rcm@FreeBSD.org>2026-10-11 20:46:56 +0000
committerMark Johnston <markj@FreeBSD.org>2026-11-16 21:17:12 +0000
commitaedfc347d08168d22b429081b9f05e42f558f3c1 (patch)
tree25e86d214c4be50e73872beb29dcf56959f5e37e /include/gssapi
parent10783f2881726bfa05c1bb6dbbc795d2338b7b26 (diff)
netlink: Make room for the unfinished message when growing the buffer
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. Approved by: so Security: FreeBSD-SA-26:77.netlink Security: CVE-2026-127747 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 (cherry picked from commit 5180fce1cf7ec7430ccf2adb88358602e5ccee1e) (cherry picked from commit dc9f234163826314a72c7560fcd6a866c13b8120)
Diffstat (limited to 'include/gssapi')
0 files changed, 0 insertions, 0 deletions