--- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -196,6 +196,9 @@ static int set_mpls(struct sk_buff *skb, __be32 lse; int err; + if (!pskb_may_pull(skb, skb_network_offset(skb) + MPLS_HLEN)) + return -ENOMEM; + stack = mpls_hdr(skb); lse = OVS_MASKED(stack->label_stack_entry, *mpls_lse, *mask); err = skb_mpls_update_lse(skb, lse);