All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: wangzyu@cn.ibm.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH]ethtool.c:fix buffer overflow when devname is too long
Date: Wed, 30 Aug 2006 07:30:00 -0400	[thread overview]
Message-ID: <44F576B8.9010000@garzik.org> (raw)
In-Reply-To: <20060830105243.GA17772@ldy-gentoo.cn.ibm.com>

wangzyu@cn.ibm.com wrote:
> As the length of field ifr_name of struct ifreq is IFNAMSIZ(16) in header file /usr/include/net/if.h. 
> It will result in buffer overflow when devname is too long. Modified strcpy to strncpy for only 
> copying IFNAMSIZ bytes into struct ifreq. Also, by adding a section into parse_cmdline to detect 
> if the length of devname is invalid.
> 
> Signed-off-by: Zhao Yu Wang <wangzyu@cn.ibm.com>

There's already a patch checked into ethtool.git for this...

	Jeff




      reply	other threads:[~2006-08-30 11:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30 10:52 [PATCH]ethtool.c:fix buffer overflow when devname is too long wangzyu
2006-08-30 11:30 ` Jeff Garzik [this message]

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=44F576B8.9010000@garzik.org \
    --to=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    --cc=wangzyu@cn.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.