opnsense-src/sys/netlink
Mark Johnston 7a78ae8865 netlink: Zero-initialize writer structures allocated on the stack
The prevailing pattern seems to be to simply initialize all fields to
zero.  Without this, it's possible to trigger a branch on uninitialized
memory, specifically, when testing nw->ignore_limit in
nlmsg_refill_buffer().

Initialize the writer structure in a couple of functions where this is
necessary.

Reported by:	KMSAN
Reviewed by:	melifaro
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38213
2023-01-26 10:46:19 -05:00
..
route netlink: Zero-initialize writer structures allocated on the stack 2023-01-26 10:46:19 -05:00
netlink.h netlink: fix NLMSG_SPACE() macro. 2022-10-31 15:02:12 +00:00
netlink_ctl.h
netlink_debug.h
netlink_domain.c netlink: allow creating sockets with SOCK_DGRAM. 2023-01-21 14:58:19 +00:00
netlink_generic.c netlink: Use NET_EPOCH_[CALL|WAIT] macros 2022-12-21 09:40:05 +08:00
netlink_generic.h netlink: fix genetlink CTRL_ATTR_MCAST_GRP_MAX define. 2022-10-31 15:03:27 +00:00
netlink_io.c netlink: suppress sending NLMSG_ERROR if NLMSG_DONE is already sent 2022-11-30 13:24:38 +00:00
netlink_linux.h
netlink_message_parser.c netlink: fix OOB write when creating attribute bitmask. 2023-01-21 18:03:47 +00:00
netlink_message_parser.h netlink: fix OOB write when creating attribute bitmask. 2023-01-21 18:03:47 +00:00
netlink_message_writer.c netlink: Fix indentation in netlink_message_writer.c 2023-01-17 09:37:33 -05:00
netlink_message_writer.h netlink: suppress sending NLMSG_ERROR if NLMSG_DONE is already sent 2022-11-30 13:24:38 +00:00
netlink_module.c netlink: Fix build without VIMAGE 2022-10-01 21:41:54 -04:00
netlink_route.c netlink: Use NET_EPOCH_[CALL|WAIT] macros 2022-12-21 09:40:05 +08:00
netlink_route.h
netlink_snl.h netlink: fix test-includes broken by f2c8381fce 2022-12-23 17:58:08 +00:00
netlink_snl_route.h netlink: fix test-includes broken by f2c8381fce 2022-12-23 17:58:08 +00:00
netlink_var.h netlink: allow more than 64 groups per netlink socket. 2022-11-03 17:05:34 +00:00