linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Dan Carpenter <error27@gmail.com>,
	Jeff Garzik <jgarzik@pobox.com>,
	Robert Hancock <hancockrwd@gmail.com>,
	Vivek Mahajan <vivek.mahajan@freescale.com>,
	linux-ide@vger.kernel.orglinu
Subject: Re: [patch] sata_sil24: memset() overflow
Date: Wed, 09 Jun 2010 14:24:08 +0200	[thread overview]
Message-ID: <4C0F87E8.8020405@kernel.org> (raw)
In-Reply-To: <20100609120153.GF5483@bicker>

On 06/09/2010 02:01 PM, Dan Carpenter wrote:
> cb->atapi.cdb is an array of 16 u8 elements.  The call too memset() 
> would set the first part of the sge array to zero as well.  It's not
> a packed struct. 
> 
> This one has been around for five years.  I found it with Smatch.  I
> think the reason no one has seen it before is because we normally call
> sil24_fill_sg() and that overwrites sge with proper information?

Yeah, the table is built after the memset so it doesn't really break
anything but still where did that 32 come from?  :-)

> Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

  reply	other threads:[~2010-06-09 12:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 12:01 [patch] sata_sil24: memset() overflow Dan Carpenter
2010-06-09 12:24 ` Tejun Heo [this message]
2010-06-10 20:14 ` 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=4C0F87E8.8020405@kernel.org \
    --to=tj@kernel.org \
    --cc=error27@gmail.com \
    --cc=hancockrwd@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.orglinu \
    --cc=vivek.mahajan@freescale.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).