mbox series

[net,v3,0/2] net: prevent infinite loop caused by incorrect proto from virtio_net_hdr_set_proto

Message ID cover.1615288658.git.bnemeth@redhat.com
Headers show
Series net: prevent infinite loop caused by incorrect proto from virtio_net_hdr_set_proto | expand

Message

Balazs Nemeth March 9, 2021, 11:30 a.m. UTC
These patches prevent an infinite loop for gso packets with a protocol
from virtio net hdr that doesn't match the protocol in the packet.
Note that packets coming from a device without
header_ops->parse_protocol being implemented will not be caught by
the check in virtio_net_hdr_to_skb, but the infinite loop will still
be prevented by the check in the gso layer.

Changes from v2 to v3:
  - Remove unused *eth.
  - Use MPLS_HLEN to also check if the MPLS header length is a multiple
    of four.

Balazs Nemeth (2):
  net: check if protocol extracted by virtio_net_hdr_set_proto is
    correct
  net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

 include/linux/virtio_net.h | 7 ++++++-
 net/mpls/mpls_gso.c        | 3 +++
 2 files changed, 9 insertions(+), 1 deletion(-)

--
2.29.2

Comments

patchwork-bot+netdevbpf@kernel.org March 10, 2021, 12:20 a.m. UTC | #1
Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Tue,  9 Mar 2021 12:30:59 +0100 you wrote:
> These patches prevent an infinite loop for gso packets with a protocol

> from virtio net hdr that doesn't match the protocol in the packet.

> Note that packets coming from a device without

> header_ops->parse_protocol being implemented will not be caught by

> the check in virtio_net_hdr_to_skb, but the infinite loop will still

> be prevented by the check in the gso layer.

> 

> [...]


Here is the summary with links:
  - [net,v3,1/2] net: check if protocol extracted by virtio_net_hdr_set_proto is correct
    https://git.kernel.org/netdev/net/c/924a9bc362a5
  - [net,v3,2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0
    https://git.kernel.org/netdev/net/c/d348ede32e99

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html