From: HighPoint Linux Team <linux@highpoint-tech.com>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: James.Bottomley@SteelEye.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hptiop: avoid buffer overflow when returning sense data
Date: Mon, 15 Oct 2007 15:48:52 +0800 [thread overview]
Message-ID: <200710151548.52588.linux@highpoint-tech.com> (raw)
In-Reply-To: <200710151442.52230.linux@highpoint-tech.com>
Andrew Morton wrote:
> >
> > avoid buffer overflow when returning sense data.
> >
>
> That's really not enough information, sorry.
>
> > index 8b384fa..d32a4a9 100644
> > --- a/drivers/scsi/hptiop.c
> > +++ b/drivers/scsi/hptiop.c
> > @@ -375,8 +375,9 @@ static void hptiop_host_request_callback
> > scp->result = SAM_STAT_CHECK_CONDITION;
> > memset(&scp->sense_buffer,
> > 0, sizeof(scp->sense_buffer));
> > - memcpy(&scp->sense_buffer,
> > - &req->sg_list, le32_to_cpu(req->dataxfer_length));
> > + memcpy(&scp->sense_buffer, &req->sg_list,
> > + min(sizeof(scp->sense_buffer),
> > + le32_to_cpu(req->dataxfer_length)));
> > break;
> >
> > default:
>
> See, we know what the fix does, but we don't know what the consequences are
> if the user's kernel doesn't have this fix.
>
> So we are not able to work out whether this fix should be backported to
> 2.6.23.x and even to 2.6.22.x?
Sorry for ambiguity. With current adapter firmware the driver is working but future
firmware updates may return sense data larger than 96 bytes, causing overflow
on scp->sense_buffer and a kernel crash.
This fix should be backported to earlier kernels.
HighPoint Linux Team
prev parent reply other threads:[~2007-10-15 7:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200605101704.27491.linux@highpoint-tech.com>
[not found] ` <200605121107.48597.linux@highpoint-tech.com>
2006-05-16 6:38 ` [PATCH] hptiop: HighPoint RocketRAID 3xxx controller driver HighPoint Linux Team
2006-06-10 15:36 ` James Bottomley
2006-06-10 16:47 ` Andrew Morton
2006-06-10 18:11 ` James Bottomley
2007-08-29 7:10 ` [PATCH] hptiop: adding new firmware interface and more PCI device IDs HighPoint Linux Team
2007-08-29 10:39 ` Jeff Garzik
2007-08-30 10:06 ` [PATCH/RESENT] " HighPoint Linux Team
2007-08-30 10:53 ` Jeff Garzik
2007-10-15 6:42 ` [PATCH] hptiop: avoid buffer overflow when returning sense data HighPoint Linux Team
2007-10-15 6:40 ` Andrew Morton
2007-10-15 7:48 ` HighPoint Linux Team [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=200710151548.52588.linux@highpoint-tech.com \
--to=linux@highpoint-tech.com \
--cc=James.Bottomley@SteelEye.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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