diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2010-07-28 23:53:47 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-02 10:26:43 -0700 |
commit | 59346700ac87134862dc0acd0ab6c9e18cfab577 (patch) | |
tree | 388a99003bb4f9d6421b3d2e480a2e19bbad8a2c /include | |
parent | 801d4c511e43f1c0b1536f4dc425521ad8743a12 (diff) |
ethtool: Fix potential user buffer overflow for ETHTOOL_{G, S}RXFH
commit bf988435bd5b53529f4408a8efb1f433f6ddfda9 upstream.
struct ethtool_rxnfc was originally defined in 2.6.27 for the
ETHTOOL_{G,S}RXFH command with only the cmd, flow_type and data
fields. It was then extended in 2.6.30 to support various additional
commands. These commands should have been defined to use a new
structure, but it is too late to change that now.
Since user-space may still be using the old structure definition
for the ETHTOOL_{G,S}RXFH commands, and since they do not need the
additional fields, only copy the originally defined fields to and
from user-space.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ethtool.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index ef4a2d84d92..03c52fa625d 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -358,6 +358,8 @@ struct ethtool_rxnfc { __u32 flow_type; /* The rx flow hash value or the rule DB size */ __u64 data; + /* The following fields are not valid and must not be used for + * the ETHTOOL_{G,X}RXFH commands. */ struct ethtool_rx_flow_spec fs; __u32 rule_cnt; __u32 rule_locs[0]; |