From: "David Müller" <dave.mueller@gmx.ch>
To: jgarzik@pobox.com
Cc: linux-ide@vger.kernel.org
Subject: [PATCH] libata: fix out-of-bounds access in pata_oldpiix.c
Date: Fri, 18 Jul 2008 09:06:12 +0200 [thread overview]
Message-ID: <488040E4.1090500@gmx.ch> (raw)
The "pata_oldpiix" driver in linux-2.6.26 is calling its "set_dmamode"
routine also locally, but under different preconditions as the
corresponding call in libata-core.c. This may cause an "out-of-array
bounds" access in "oldpiix_set_dmamode".
Signed-off-by: Dave Mueller <dave.mueller@gmx.ch>
diff -dpurN a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c
--- a/drivers/ata/pata_oldpiix.c 2008-07-18 08:13:38.000000000 +0200
+++ b/drivers/ata/pata_oldpiix.c 2008-07-18 08:18:45.000000000 +0200
@@ -198,7 +198,7 @@ static unsigned int oldpiix_qc_issue(str
if (adev != ap->private_data) {
oldpiix_set_piomode(ap, adev);
- if (adev->dma_mode)
+ if (adev->dma_mode != 0xff)
oldpiix_set_dmamode(ap, adev);
}
return ata_sff_qc_issue(qc);
next reply other threads:[~2008-07-18 7:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 7:06 David Müller [this message]
2008-07-18 8:55 ` [PATCH] libata: fix out-of-bounds access in pata_oldpiix.c Alan Cox
2008-07-18 14:15 ` Bartlomiej Zolnierkiewicz
2008-08-01 4:35 ` Tejun Heo
2008-08-01 22:29 ` Alan Cox
2008-08-03 5:22 ` Tejun Heo
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=488040E4.1090500@gmx.ch \
--to=dave.mueller@gmx.ch \
--cc=jgarzik@pobox.com \
--cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).