Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c164772d authored by David S. Miller's avatar David S. Miller
Browse files

Revert "decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb"



This reverts commit 85eac2ba.

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

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9065bc38
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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))