<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/core/ethtool.c, branch linux-2.6.32.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.32.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.32.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-12-05T23:49:16Z</updated>
<entry>
<title>ethtool: Use kcalloc instead of kmalloc for ethtool_get_strings</title>
<updated>2015-12-05T23:49:16Z</updated>
<author>
<name>Joe Perches</name>
</author>
<published>2015-10-14T08:09:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62611261b1f4e93561adcedc919473481cebc2f4'/>
<id>urn:sha1:62611261b1f4e93561adcedc919473481cebc2f4</id>
<content type='text'>
[ Upstream commit 077cb37fcf6f00a45f375161200b5ee0cd4e937b ]

It seems that kernel memory can leak into userspace by a
kmalloc, ethtool_get_strings, then copy_to_user sequence.

Avoid this by using kcalloc to zero fill the copied buffer.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
(cherry picked from commit 68c3e59aa9cdf2d8870d8fbe4f37b1a509d0abeb)

Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>ethtool: Report link-down while interface is down</title>
<updated>2014-06-18T22:25:56Z</updated>
<author>
<name>Ben Hutchings</name>
</author>
<published>2010-12-09T12:08:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d100b2748ac930237a97646ae9a4721a7f62acc1'/>
<id>urn:sha1:d100b2748ac930237a97646ae9a4721a7f62acc1</id>
<content type='text'>
While an interface is down, many implementations of
ethtool_ops::get_link, including the default, ethtool_op_get_link(),
will report the last link state seen while the interface was up.  In
general the current physical link state is not available if the
interface is down.

Define ETHTOOL_GLINK to reflect whether the interface *and* any
physical port have a working link, and consistently return 0 when the
interface is down.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
(cherry picked from commit e596e6e4d578f2639416e620d367a3af34814a40)
Cc: Wang Weidong &lt;wangweidong1@huawei.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>net: clear heap allocation for ETHTOOL_GRXCLSRLALL</title>
<updated>2010-12-09T21:26:34Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2010-10-07T10:03:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c98bcd65f0b27bc36dddbc1c9fe8222ceefc701'/>
<id>urn:sha1:5c98bcd65f0b27bc36dddbc1c9fe8222ceefc701</id>
<content type='text'>
commit ae6df5f96a51818d6376da5307d773baeece4014 upstream.

Calling ETHTOOL_GRXCLSRLALL with a large rule_cnt will allocate kernel
heap without clearing it. For the one driver (niu) that implements it,
it will leave the unused portion of heap unchanged and copy the full
contents back to userspace.

Signed-off-by: Kees Cook &lt;kees.cook@canonical.com&gt;
Acked-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>net: clear heap allocations for privileged ethtool actions</title>
<updated>2010-10-29T04:44:09Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2010-10-11T19:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3765ba02027246e3a709990cda1b95d031e87404'/>
<id>urn:sha1:3765ba02027246e3a709990cda1b95d031e87404</id>
<content type='text'>
[ Upstream commit b00916b189d13a615ff05c9242201135992fcda3 ]

Several other ethtool functions leave heap uncleared (potentially) by
drivers. Some interfaces appear safe (eeprom, etc), in that the sizes
are well controlled. In some situations (e.g. unchecked error conditions),
the heap will remain unchanged in areas before copying back to userspace.
Note that these are less of an issue since these all require CAP_NET_ADMIN.

Cc: stable@kernel.org
Signed-off-by: Kees Cook &lt;kees.cook@canonical.com&gt;
Acked-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>ethtool: Fix potential user buffer overflow for ETHTOOL_{G, S}RXFH</title>
<updated>2010-08-02T17:21:06Z</updated>
<author>
<name>Ben Hutchings</name>
</author>
<published>2010-07-28T22:53:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2441cdd9bb277e0fe7f7fabbe8397adfa8f5d8ba'/>
<id>urn:sha1:2441cdd9bb277e0fe7f7fabbe8397adfa8f5d8ba</id>
<content type='text'>
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 &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL</title>
<updated>2010-08-02T17:20:53Z</updated>
<author>
<name>Ben Hutchings</name>
</author>
<published>2010-06-28T08:44:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81cb675339c33e6cc30c14e367502692a90b9736'/>
<id>urn:sha1:81cb675339c33e6cc30c14e367502692a90b9736</id>
<content type='text'>
commit db048b69037e7fa6a7d9e95a1271a50dc08ae233 upstream.

On a 32-bit machine, info.rule_cnt &gt;= 0x40000000 leads to integer
overflow and the buffer may be smaller than needed.  Since
ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at
least denial of service.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>net/ethtool: Add support for the ethtool feature to flash firmware image from a specified file.</title>
<updated>2009-09-03T06:07:39Z</updated>
<author>
<name>Ajit Khaparde</name>
</author>
<published>2009-09-02T17:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05c6a8d7a7d778f26d8eb821556988993b766092'/>
<id>urn:sha1:05c6a8d7a7d778f26d8eb821556988993b766092</id>
<content type='text'>
This patch adds support to flash a firmware image to a device using ethtool.
The driver gets the filename of the firmware image and flashes the image
using the request firmware path.

The region "on the chip" to be flashed can be specified by an option.
It is upto the device driver to enumerate the region number passed by ethtool,
to the region to be flashed.

The default behavior is to flash all the regions on the chip.

Signed-off-by: Ajit Khaparde &lt;ajitk@serverengines.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethtool_op_get_rx_csum() should be public and exported</title>
<updated>2009-07-27T18:35:31Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2009-07-26T23:18:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a729fce76f7af50d8b622f2fb26adce9c8df743'/>
<id>urn:sha1:8a729fce76f7af50d8b622f2fb26adce9c8df743</id>
<content type='text'>
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethtool: device independent rx_csum and get_flags routines</title>
<updated>2009-07-27T02:25:45Z</updated>
<author>
<name>Sridhar Samudrala</name>
</author>
<published>2009-07-22T13:38:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1896e61ff7cc1c9dd0d8b1cf4a9426a0f7217a20'/>
<id>urn:sha1:1896e61ff7cc1c9dd0d8b1cf4a9426a0f7217a20</id>
<content type='text'>
This helps avoid error messages with ethtool -k on devices that
don't provide device specific routines.

Signed-off-by: Sridhar Samudrala &lt;sri@us.ibm.com&gt;

------------------------------------------------------------------
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>core: remove pointless conditional before kfree()</title>
<updated>2009-03-31T22:06:26Z</updated>
<author>
<name>Wei Yongjun</name>
</author>
<published>2009-03-31T22:06:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c9caceca25854eff4328c89045793a91bf8f9ee3'/>
<id>urn:sha1:c9caceca25854eff4328c89045793a91bf8f9ee3</id>
<content type='text'>
Remove pointless conditional before kfree().

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
