diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 5d069715bd0279c386752e20f16f1590c082c2bd..aef6ab48728720772e1b1abc6f6cf28f5a8de200 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1954,7 +1954,7 @@ static int packet_sendmsg_spkt(struct socket *sock, struct msghdr *msg, goto retry; } - if (!dev_validate_header(dev, skb->data, len)) { + if (!dev_validate_header(dev, skb->data, len) || !skb->len) { err = -EINVAL; goto out_unlock; }