Page MenuHomeFreeBSD

freebsd32: fix padding of computed control message length for recvmsg()
ClosedPublic

Authored by jah on Mar 30 2019, 11:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 28, 3:14 PM
Unknown Object (File)
Fri, Oct 24, 9:48 AM
Unknown Object (File)
Sun, Oct 19, 9:30 AM
Unknown Object (File)
Sun, Oct 19, 9:30 AM
Unknown Object (File)
Sun, Oct 19, 9:30 AM
Unknown Object (File)
Sat, Oct 18, 8:32 PM
Unknown Object (File)
Tue, Oct 14, 1:14 AM
Unknown Object (File)
Sep 30 2025, 4:06 PM
Subscribers

Details

Summary

Each control message region must be aligned on a 4-byte boundary on 32-bit
architectures. The 32-bit compat shim for recvmsg() gets the actual layout
right, but doesn't pad the payload length when computing msg_controllen for
the output message header. If a control message contains an unaligned
payload, such as the 1-byte TTL field in the example attached to PR 236737,
this can produce control message payload boundaries that extend beyond
the boundary reported by msg_controllen.

PR: 236737

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23410
Build 22426: arc lint + arc unit