linux/tools/hv
Olaf Hering 2bc41ea3b3 Tools: hv: correct payload size in netlink_send
netlink_send is supposed to send just the cn_msg+hv_kvp_msg via netlink.
Currently it sets an incorrect iovec size, as reported by valgrind.

In the case of registering with the kernel the allocated buffer is large
enough to hold nlmsghdr+cn_msg+hv_kvp_msg, no overrun happens. In the
case of responding to the kernel the cn_msg is located in the middle of
recv_buffer, after the nlmsghdr. Currently the code in netlink_send adds
also the size of nlmsghdr to the payload. But nlmsghdr is a separate
iovec. This leads to an (harmless) out-of-bounds access when the kernel
processes the iovec. Correct the iovec size of the cn_msg to be just
cn_msg + its payload.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-12 15:44:57 -07:00
..
hv_get_dhcp_info.sh Tools: hv: Add an example script to retrieve dhcp state 2012-09-10 16:42:32 -07:00
hv_get_dns_info.sh Tools: hv: Add an example script to retrieve DNS entries 2012-09-04 15:59:27 -07:00
hv_kvp_daemon.c Tools: hv: correct payload size in netlink_send 2013-08-12 15:44:57 -07:00
hv_set_ifconfig.sh tools: hv: Fix how ifcfg-* file is created 2013-01-17 11:47:21 -08:00
hv_vss_daemon.c Tools: hv: correct payload size in netlink_send 2013-08-12 15:44:57 -07:00