diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index df5da18e708b51..0c8c104fd256fa 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1947,7 +1947,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; }