]> git.hungrycats.org Git - linux/commit
virtio_net: Add hash_key_length check
authorPhilo Lu <lulie@linux.alibaba.com>
Mon, 4 Nov 2024 08:57:04 +0000 (16:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Nov 2024 12:15:12 +0000 (13:15 +0100)
commitf3401e3c8d339ddb6ccb2e3d11ad634b7846a806
tree3b48940f6b4dc5add0a67eb55c1ad9292ab4e705
parent2af6499260c44de778ca52423204749af6178f96
virtio_net: Add hash_key_length check

[ Upstream commit 3f7d9c1964fcd16d02a8a9d4fd6f6cb60c4cc530 ]

Add hash_key_length check in virtnet_probe() to avoid possible out of
bound errors when setting/reading the hash key.

Fixes: c7114b1249fa ("drivers/net/virtio_net: Added basic RSS support.")
Signed-off-by: Philo Lu <lulie@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Joe Damato <jdamato@fastly.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/virtio_net.c