| Previous | Next |
| MACH_RCV_INVALID_TYPE | MACH_RCV_INVALID_TRAILER |
MACH_RCV_SCATTER_SMALL
An out-of-line receive target lacks enough capacity
MACH_RCV_SCATTER_SMALL says that an out-of-line overwrite region is not large enough. It is more specific than MACH_RCV_TOO_LARGE: that general result concerns the receive buffer for inline data, while this result concerns one of the caller-provided destinations used to receive out-of-line data through a scatter receive path.
The problem can be localized by treating each out-of-line region as an independent capacity contract. Increasing only the main message buffer may leave the failing region unchanged. Conversely, unbounded allocation based on a peer-controlled size is unsafe; the receiver still needs a protocol maximum and a clear reject policy.
What to inspect
- Identify which out-of-line descriptor is mapped to each overwrite region and log both requested and available sizes.
- Validate the number, order, and lifetime of scatter targets in addition to their individual capacities.
- Distinguish a too-small target from
MACH_RCV_INVALID_TYPE, which indicates an invalid scatter specification rather than a sizing shortfall. - Set explicit upper bounds before growing receive storage, then surface a protocol-level error when the peer exceeds them.
References
- Apple XNU source: mach/message.h
- Mach Kernel Interface Reference: mach_msg
- GNU Mach Reference Manual: interprocess communication
Looking for a different code? Search another status or error code.