diff options
-rw-r--r-- | net/netlink/af_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index a67f1b44c9a3..bb50c8a9fcad 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -1422,7 +1422,7 @@ static int netlink_rcv_skb(struct sk_buff *skb, int (*cb)(struct sk_buff *, | |||
1422 | while (skb->len >= nlmsg_total_size(0)) { | 1422 | while (skb->len >= nlmsg_total_size(0)) { |
1423 | nlh = (struct nlmsghdr *) skb->data; | 1423 | nlh = (struct nlmsghdr *) skb->data; |
1424 | 1424 | ||
1425 | if (skb->len < nlh->nlmsg_len) | 1425 | if (nlh->nlmsg_len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len) |
1426 | return 0; | 1426 | return 0; |
1427 | 1427 | ||
1428 | total_len = min(NLMSG_ALIGN(nlh->nlmsg_len), skb->len); | 1428 | total_len = min(NLMSG_ALIGN(nlh->nlmsg_len), skb->len); |