summaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-06-08 10:50:18 -0400
committerDavid S. Miller <davem@davemloft.net>2017-06-08 10:50:18 -0400
commitc164772dd32343ee19e276ce0137830557517834 (patch)
tree3b4ca5565c0f73231f4154dd5b3120f19310367f /net/decnet
parent9065bc386fcf52dee8f697450ddeb788e1bd514c (diff)
downloadlinux-stable-c164772dd32343ee19e276ce0137830557517834.tar.gz
linux-stable-c164772dd32343ee19e276ce0137830557517834.tar.bz2
linux-stable-c164772dd32343ee19e276ce0137830557517834.zip
Revert "decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb"
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>
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/netfilter/dn_rtmsg.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c
index 26e020e9d415..1ed81ac6dd1a 100644
--- a/net/decnet/netfilter/dn_rtmsg.c
+++ b/net/decnet/netfilter/dn_rtmsg.c
@@ -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))