diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2020-12-23 16:15:11 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2020-12-23 16:16:40 +0000 |
| commit | 92be2847e845ba90e4da028cfd7f5a8013919f90 (patch) | |
| tree | 3901d13019e6884d180556251e99d2525dc3a17f /tools/debugscripts | |
| parent | a7a7c306bfb0d8d1a83569a098cf6cde492f8bf7 (diff) | |
rtsock: Avoid copying uninitialized padding bytes
When copying sockaddrs out to userspace, we pad them to a multiple of
the platform alignment (sizeof(long)). However, some sockaddr sizes,
such as struct sockaddr_dl, are not an integer multiple of the
alignment, so we may end up copying out uninitialized bytes.
Fix this by always bouncing through a pre-zeroed sockaddr_storage.
Reported by: KASAN
Reviewed by: melifaro
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27729
Diffstat (limited to 'tools/debugscripts')
0 files changed, 0 insertions, 0 deletions
