netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: segooon@gmail.com
Cc: kernel-janitors@vger.kernel.org, ramkrishna.vepa@exar.com,
	sivakumar.subramani@exar.com, sreenivasa.honnur@exar.com,
	jon.mason@exar.com, joe@perches.com, jpirko@redhat.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH] net: s2io: fix buffer overflow
Date: Fri, 23 Jul 2010 13:06:04 -0700 (PDT)	[thread overview]
Message-ID: <20100723.130604.15256955.davem@davemloft.net> (raw)
In-Reply-To: <1279902976-27146-1-git-send-email-segooon@gmail.com>

From: Kulikov Vasiliy <segooon@gmail.com>
Date: Fri, 23 Jul 2010 20:36:15 +0400

> vpd_data[] is allocated as kmalloc(256, GFP_KERNEL), so if cnt = 255
> then (cnt + 3) overflows 256. memset() is executed without checking.
> vpd_data[cnt+2] must be less than 256-cnt-2 as the latter is number of
> vpd_data[] elements to copy.
> 
> Do not fill with zero the beginning of nic->serial_num as it will
> be filled with vpd_data[].
> 
> String in product_name[] should be terminated by '\0'.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>

Applied.

      reply	other threads:[~2010-07-23 20:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-23 16:36 [PATCH] net: s2io: fix buffer overflow Kulikov Vasiliy
2010-07-23 20:06 ` David Miller [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=20100723.130604.15256955.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=jon.mason@exar.com \
    --cc=jpirko@redhat.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ramkrishna.vepa@exar.com \
    --cc=segooon@gmail.com \
    --cc=sivakumar.subramani@exar.com \
    --cc=sreenivasa.honnur@exar.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;
as well as URLs for NNTP newsgroup(s).