From: Chris Wright <chrisw@osdl.org>
To: jgarzik@pobox.com
Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org
Subject: [PATCH] ethtool_get_regs copy right number of bytes to user
Date: Tue, 15 Jun 2004 15:55:41 -0700 [thread overview]
Message-ID: <20040615155541.Q21045@build.pdx.osdl.net> (raw)
If regs.len is smaller than reglen it's possible to copy more bytes out
than the user asked for.
Signed-off-by: Chris Wright <chrisw@osdl.org>
===== net/core/ethtool.c 1.14 vs edited =====
--- 1.14/net/core/ethtool.c 2004-06-02 14:54:28 -07:00
+++ edited/net/core/ethtool.c 2004-06-13 12:59:15 -07:00
@@ -157,7 +157,7 @@
if (copy_to_user(useraddr, ®s, sizeof(regs)))
goto out;
useraddr += offsetof(struct ethtool_regs, data);
- if (copy_to_user(useraddr, regbuf, reglen))
+ if (copy_to_user(useraddr, regbuf, regs.len))
goto out;
ret = 0;
next reply other threads:[~2004-06-15 22:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-15 22:55 Chris Wright [this message]
2004-08-01 19:03 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040615155541.Q21045@build.pdx.osdl.net \
--to=chrisw@osdl.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®