]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: Fix potential user buffer overflow for ETHTOOL_{G, S}RXFH
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 28 Jun 2010 08:45:58 +0000 (08:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jun 2010 08:00:29 +0000 (01:00 -0700)
commit86032470f20aca1e1176062e1e708afda1ce289e
tree7805f577d019f587146b4fd1cf642faacfec2f14
parent7f6bfb5d3196ad45336bea406611341e7a7bb3ab
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 <bhutchings@solarflare.com>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ethtool.h
net/core/ethtool.c