]> git.kernelconcepts.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:21:06 +0000 (10:21 -0700)
commit2441cdd9bb277e0fe7f7fabbe8397adfa8f5d8ba
tree00a6d9462723c55fe1978a827da80be27d76bda8
parent699be7999d6dd286b4f652c7bc7901236fbc3cf5
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