diff options
| author | Kees Cook <[email protected]> | 2021-06-21 22:21:12 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2021-06-22 17:20:51 +0000 |
| commit | f2fcffe392c1fd8324f131bf33d7d350eff44bb6 (patch) | |
| tree | fb85680aff5b1a0069ef6d1ce0bc5974776fe449 /drivers/net/hyperv/hyperv_net.h | |
| parent | net: dsa: b53: Create default VLAN entry explicitly (diff) | |
| download | kernel-f2fcffe392c1fd8324f131bf33d7d350eff44bb6.tar.gz kernel-f2fcffe392c1fd8324f131bf33d7d350eff44bb6.zip | |
hv_netvsc: Avoid field-overflowing memcpy()
In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memcpy(), memmove(), and memset(), avoid
intentionally writing across neighboring fields.
Add flexible array to represent start of buf_info, improving readability
and avoid future warning where memcpy() thinks it is writing past the
end of the structure.
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
| -rw-r--r-- | drivers/net/hyperv/hyperv_net.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index 442c520ab8f3..9e5eee44f7d3 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/drivers/net/hyperv/hyperv_net.h @@ -1163,6 +1163,7 @@ struct rndis_set_request { u32 info_buflen; u32 info_buf_offset; u32 dev_vc_handle; + u8 info_buf[]; }; /* Response to NdisSetRequest */ |
