Thread (48 messages) flat view 48 messages, 4 authors, 2018-10-09

Re: [PATCH v2 net-next 11/23] rtnetlink: Update rtnl_stats_dump for strict data checking

From: David Miller <davem@davemloft.net>
Date: 2018-10-09 01:15:53

From: David Ahern <redacted>
Date: Mon, 8 Oct 2018 07:25:34 -0600
On 10/8/18 4:17 AM, Christian Brauner wrote:
quoted
quoted
@@ -4696,13 +4697,32 @@ static int rtnl_stats_dump(struct sk_buff *skb, struct netlink_callback *cb)
 
 	cb->seq = net->dev_base_seq;
 
-	if (nlmsg_len(cb->nlh) < sizeof(*ifsm))
+	if (nlmsg_len(cb->nlh) < sizeof(*ifsm)) {
+		NL_SET_ERR_MSG(extack, "Invalid header for stats dump");
 		return -EINVAL;
+	}
 
 	ifsm = nlmsg_data(cb->nlh);
+
+	/* only requests using NLM_F_DUMP_PROPER_HDR can pass data to
That looks like an accidental leftover before we changed this to a
socket option. :)
ugh. thanks for noticing.
David, I applied this series, please send me relative fixups at this point
if necessary.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help