Page MenuHomeFreeBSD

socket_msg_trunc: allocate a large enough buffer
ClosedPublic

Authored by brooks on Jan 6 2024, 12:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
May 17 2024, 7:21 PM
Unknown Object (File)
May 12 2024, 1:35 PM
Unknown Object (File)
May 11 2024, 5:41 PM
Unknown Object (File)
May 10 2024, 10:15 AM
Unknown Object (File)
May 8 2024, 5:49 AM
Unknown Object (File)
Feb 10 2024, 9:43 PM
Unknown Object (File)
Feb 3 2024, 8:24 AM
Unknown Object (File)
Jan 12 2024, 5:08 PM
Subscribers

Details

Summary

Allocate 9000 bytes to match the largest requsted size. Add a check to
prevent the list of sizes and buffer size from getting out of sync
again.

Found with: CheriBSD

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

It'd be a bit cleaner to allocate the buffer with malloc(), but this works.

tests/sys/kern/socket_msg_trunc.c
55
This revision is now accepted and ready to land.Jan 6 2024, 3:34 PM