Mark Johnston 92be2847e8 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
2020-12-23 11:16:40 -05:00
..
2020-12-17 17:09:43 +00:00
2020-12-23 16:06:15 +00:00
2020-09-17 22:29:38 +00:00
2020-11-04 12:07:33 +00:00
2020-12-17 18:52:04 +00:00
2020-12-23 16:06:15 +00:00