From: Andrew Morton <akpm@linux-foundation.org>
To: HighPoint Linux Team <linux@highpoint-tech.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
James.Bottomley@SteelEye.com
Subject: Re: [PATCH] hptiop: avoid buffer overflow when returning sense data
Date: Sun, 14 Oct 2007 23:40:14 -0700 [thread overview]
Message-ID: <20071014234014.45b5469b.akpm@linux-foundation.org> (raw)
In-Reply-To: <200710151442.52230.linux@highpoint-tech.com>
On Mon, 15 Oct 2007 14:42:52 +0800 HighPoint Linux Team <linux@highpoint-tech.com> 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?
next prev parent reply other threads:[~2007-10-15 6: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 [this message]
2007-10-15 7:48 ` HighPoint Linux Team
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=20071014234014.45b5469b.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@highpoint-tech.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).