summaryrefslogtreecommitdiff
path: root/net/core/ethtool.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-05-04 09:58:56 -0400
committerDavid S. Miller <davem@davemloft.net>2018-05-04 09:58:56 -0400
commita7b15ab887e5b8e9803136b5a4a0008d7a3dea86 (patch)
treeca5342d29badb2a3cce2a353b786c8ab4a993c1e /net/core/ethtool.c
parentb05f03b232ab4f8f173eeae291a4c9cd662a6676 (diff)
parent1504269814263c9676b4605a6a91e14dc6ceac21 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Overlapping changes in selftests Makefile. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/ethtool.c')
-rw-r--r--net/core/ethtool.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 3c6ce8a3928a..c15075dc7572 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -1007,6 +1007,11 @@ static noinline_for_stack int ethtool_get_rxnfc(struct net_device *dev,
info_size = sizeof(info);
if (copy_from_user(&info, useraddr, info_size))
return -EFAULT;
+ /* Since malicious users may modify the original data,
+ * we need to check whether FLOW_RSS is still requested.
+ */
+ if (!(info.flow_type & FLOW_RSS))
+ return -EINVAL;
}
if (info.cmd == ETHTOOL_GRXCLSRLALL) {