mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
virtio-net: zero unused hash fields
When GSO tunnel is negotiated virtio_net_hdr_tnl_from_skb() tries to
initialize the tunnel metadata but forget to zero unused rxhash
fields. This may leak information to another side. Fixing this by
zeroing the unused hash fields.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: a2fb4bc4e2 ("net: implement virtio helpers to handle UDP GSO tunneling")
Cc: <stable@vger.kernel.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Link: https://patch.msgid.link/20251022034421.70244-1-jasowang@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
399d109347
commit
b2284768c6
@@ -401,6 +401,10 @@ virtio_net_hdr_tnl_from_skb(const struct sk_buff *skb,
|
||||
if (!tnl_hdr_negotiated)
|
||||
return -EINVAL;
|
||||
|
||||
vhdr->hash_hdr.hash_value = 0;
|
||||
vhdr->hash_hdr.hash_report = 0;
|
||||
vhdr->hash_hdr.padding = 0;
|
||||
|
||||
/* Let the basic parsing deal with plain GSO features. */
|
||||
skb_shinfo(skb)->gso_type &= ~tnl_gso_type;
|
||||
ret = virtio_net_hdr_from_skb(skb, hdr, true, false, vlan_hlen);
|
||||
|
||||
Reference in New Issue
Block a user