From: Ben Hutchings Date: Mon, 28 Jun 2010 08:45:58 +0000 (+0000) Subject: ethtool: Fix potential user buffer overflow for ETHTOOL_{G, S}RXFH X-Git-Tag: v2.6.35-rc5~14^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf988435bd5b53529f4408a8efb1f433f6ddfda9;p=pandora-kernel.git ethtool: Fix potential user buffer overflow for ETHTOOL_{G, S}RXFH 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 Cc: stable@kernel.org Signed-off-by: David S. Miller --- Reading git-diff-tree failed