]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Revert "decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb"
authorDavid S. Miller <davem@davemloft.net>
Thu, 8 Jun 2017 14:50:18 +0000 (10:50 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Jun 2017 14:50:18 +0000 (10:50 -0400)
This reverts commit 85eac2ba35a2dbfbdd5767c7447a4af07444a5b4.

There is an updated version of this fix which we should
use instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/decnet/netfilter/dn_rtmsg.c

index 26e020e9d4152eab0dac969f14a4acace96ef0fd..1ed81ac6dd1a28b79dff9f9f4e8c1d0f99306a33 100644 (file)
@@ -102,9 +102,7 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
 {
        struct nlmsghdr *nlh = nlmsg_hdr(skb);
 
-       if (skb->len < sizeof(nlh->nlmsg_len) ||
-           nlh->nlmsg_len < sizeof(*nlh) ||
-           skb->len < nlh->nlmsg_len)
+       if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len)
                return;
 
        if (!netlink_capable(skb, CAP_NET_ADMIN))