WSL2-Linux-Kernel/tools/hv
Paul Meyer 297d6b6e56 hv: kvp: Avoid reading past allocated blocks from KVP file
While reading in more than one block (50) of KVP records, the allocation
goes per block, but the reads used the total number of allocated records
(without resetting the pointer/stream). This causes the records buffer to
overrun when the refresh reads more than one block over the previous
capacity (e.g. reading more than 100 KVP records whereas the in-memory
database was empty before).

Fix this by reading the correct number of KVP records from file each time.

Signed-off-by: Paul Meyer <Paul.Meyer@microsoft.com>
Signed-off-by: Long Li <longli@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 16:56:26 +01:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hv_fcopy_daemon.c Tools: hv: update buffer handling in hv_fcopy_daemon 2017-08-16 09:16:29 -07:00
hv_get_dhcp_info.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01: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 hv: kvp: Avoid reading past allocated blocks from KVP file 2017-11-28 16:56:26 +01:00
hv_set_ifconfig.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hv_vss_daemon.c Tools: hv: vss: Skip freezing filesystems backed by loop 2017-08-16 09:14:42 -07:00
lsvmbus License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00