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
F166178188: D43340.id132529.diff
Wed, Aug 12, 4:01 AM
Unknown Object (File)
Mon, Aug 10, 6:12 PM
Unknown Object (File)
Sat, Aug 8, 8:34 PM
Unknown Object (File)
Fri, Aug 7, 9:41 PM
Unknown Object (File)
Thu, Aug 6, 10:43 AM
Unknown Object (File)
Jul 7 2026, 8:18 PM
Unknown Object (File)
Jun 25 2026, 5:13 AM
Unknown Object (File)
Jun 23 2026, 12:26 AM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 55270
Build 52159: arc lint + arc unit

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