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

Commit 745b6ab4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "netfilter: nfnetlink: correctly validate length of batch messages"

parents 0e78e14d 868b4c93
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -321,10 +321,12 @@ replay:
		nlh = nlmsg_hdr(skb);
		err = 0;

		if (nlmsg_len(nlh) < sizeof(struct nfgenmsg) ||
		    skb->len < nlh->nlmsg_len) {
			err = -EINVAL;
			goto ack;
		if (nlh->nlmsg_len < NLMSG_HDRLEN ||
		    skb->len < nlh->nlmsg_len ||
		    nlmsg_len(nlh) < sizeof(struct nfgenmsg)) {
			nfnl_err_reset(&err_list);
			success = false;
			goto done;
		}

		/* Only requests are handled by the kernel */