Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1468553
| From | Luis Henriques <luis.henriques@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() |
| Date | 2016-08-23 15:50 +0200 |
| Message-ID | <s9kfv-4GF-3@gated-at.bofh.it> (permalink) |
| References | <s9kfv-4GF-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Avijit Kanti Das <avijitnsec@codeaurora.org>
memset() the structure ethtool_wolinfo that has padded bytes
but the padded bytes have not been zeroed out.
Change-Id: If3fd2d872a1b1ab9521d937b86a29fc468a8bbfe
Signed-off-by: Avijit Kanti Das <avijitnsec@codeaurora.org>
---
net/core/ethtool.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 977489820eb9..6bf6362e8114 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -1435,11 +1435,13 @@ static int ethtool_reset(struct net_device *dev, char __user *useraddr)
static int ethtool_get_wol(struct net_device *dev, char __user *useraddr)
{
- struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL };
+ struct ethtool_wolinfo wol;
if (!dev->ethtool_ops->get_wol)
return -EOPNOTSUPP;
+ memset(&wol, 0, sizeof(struct ethtool_wolinfo));
+ wol.cmd = ETHTOOL_GWOL;
dev->ethtool_ops->get_wol(dev, &wol);
if (copy_to_user(useraddr, &wol, sizeof(wol)))
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
CVE-2014-9900 fix is not upstream Luis Henriques <luis.henriques@canonical.com> - 2016-08-23 15:50 +0200
net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() Luis Henriques <luis.henriques@canonical.com> - 2016-08-23 15:50 +0200
Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() Joe Perches <joe@perches.com> - 2016-08-23 16:20 +0200
Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() Joe Perches <joe@perches.com> - 2016-08-23 17:50 +0200
Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() Eric Dumazet <eric.dumazet@gmail.com> - 2016-08-23 16:50 +0200
Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() Joe Perches <joe@perches.com> - 2016-08-23 17:30 +0200
Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() Eric Dumazet <eric.dumazet@gmail.com> - 2016-08-23 17:40 +0200
Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() Andrey Ryabinin <ryabinin.a.a@gmail.com> - 2016-08-23 18:40 +0200
Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() Edward Cree <ecree@solarflare.com> - 2016-08-23 19:00 +0200
Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() Vegard Nossum <vegard.nossum@gmail.com> - 2016-08-23 19:20 +0200
Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() Ben Hutchings <ben@decadent.org.uk> - 2016-08-23 19:40 +0200
Re: CVE-2014-9900 fix is not upstream David Miller <davem@davemloft.net> - 2016-08-23 18:50 +0200
Re: CVE-2014-9900 fix is not upstream Ben Hutchings <ben@decadent.org.uk> - 2016-08-23 19:40 +0200
Re: CVE-2014-9900 fix is not upstream David Miller <davem@davemloft.net> - 2016-08-23 20:30 +0200
Re: CVE-2014-9900 fix is not upstream Al Viro <viro@ZenIV.linux.org.uk> - 2016-08-23 22:20 +0200
Re: CVE-2014-9900 fix is not upstream Joe Perches <joe@perches.com> - 2016-08-23 22:40 +0200
Re: CVE-2014-9900 fix is not upstream lsorense@csclub.uwaterloo.ca (Lennart Sorensen) - 2016-08-23 23:00 +0200
Re: CVE-2014-9900 fix is not upstream Al Viro <viro@ZenIV.linux.org.uk> - 2016-08-23 23:30 +0200
Re: CVE-2014-9900 fix is not upstream lsorense@csclub.uwaterloo.ca (Lennart Sorensen) - 2016-08-24 16:10 +0200
Re: CVE-2014-9900 fix is not upstream Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-08-24 22:40 +0200
csiph-web