diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 06c526e0d810e4cd948c4d7954d8b5283345e370..e578544b2cc7110ec2f6bcf4c29d93e4b4b1ad14 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -5786,6 +5786,9 @@ int skb_mpls_dec_ttl(struct sk_buff *skb)
 	if (unlikely(!eth_p_mpls(skb->protocol)))
 		return -EINVAL;
 
+	if (!pskb_may_pull(skb, skb_network_offset(skb) + MPLS_HLEN))
+		return -ENOMEM;
+
 	lse = be32_to_cpu(mpls_hdr(skb)->label_stack_entry);
 	ttl = (lse & MPLS_LS_TTL_MASK) >> MPLS_LS_TTL_SHIFT;
 	if (!--ttl)