]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ethtool: Fix potential user buffer overflow for ETHTOOL_{G, S}RXFH
authorBen Hutchings <ben@decadent.org.uk>
Wed, 28 Jul 2010 22:53:47 +0000 (23:53 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:26:43 +0000 (10:26 -0700)
commit59346700ac87134862dc0acd0ab6c9e18cfab577
tree388a99003bb4f9d6421b3d2e480a2e19bbad8a2c
parent801d4c511e43f1c0b1536f4dc425521ad8743a12
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>
include/linux/ethtool.h
net/core/ethtool.c