diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-05-14 11:22:59 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-05-14 11:22:59 +0200 |
commit | 4b96583869c4d990b779eca72976063970d41b8d (patch) | |
tree | f2fdb7760a06f6445f33fdee3ec512fbdb46fcb4 /net/core/ethtool.c | |
parent | 53667c670fe00d63246fb3cfb4480bb1ba247bcc (diff) | |
parent | 67b8d5c7081221efa252e111cd52532ec6d4266f (diff) | |
download | linux-4b96583869c4d990b779eca72976063970d41b8d.tar.bz2 |
Merge tag 'v4.17-rc5' into irq/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/core/ethtool.c')
-rw-r--r-- | net/core/ethtool.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 03416e6dd5d7..ba02f0dfe85c 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -1032,6 +1032,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) { |