diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 48f676411724..f76fe6972859 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -2900,8 +2900,12 @@ void *__pskb_pull_tail(struct sk_buff *skb, int delta) return NULL; } - BUG_ON(skb_copy_bits(skb, skb_headlen(skb), - skb_tail_pointer(skb), delta)); + if (unlikely((skb_copy_bits(skb, skb_headlen(skb), + skb_tail_pointer(skb), delta))){ + pr_err_ratelimited("skbuff: length discrepancy" + "detected in %s.\n", __func__); + return NULL; + } /* Optimization: no fragments, no reasons to preestimate * size of pulled pages. Superb.