public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] a100u2w: Added sanitization for pointer dereference using a value from hardware. Detected using Carburizer  (http://lwn.net/Articles/479653/)
@ 2012-12-27  8:59 Asim Kadav
  2012-12-27 11:25 ` James Bottomley
  0 siblings, 1 reply; 5+ messages in thread
From: Asim Kadav @ 2012-12-27  8:59 UTC (permalink / raw)
  To: James E.J. Bottomley, linux-scsi

Signed-off-by: Asim Kadav <kadav@cs.wisc.edu>
---
 drivers/scsi/a100u2w.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index 0163457..c2ca15c 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -821,6 +821,9 @@ static irqreturn_t orc_interrupt(struct orc_host * host)
 		/* Get the SCB index of the SCB to service */
 		scb_index = inb(host->base + ORC_RQUEUE);
 
+		/* Sanitize incoming index */
+		scb_index &= 31;
+
 		/* Translate it back to a host pointer */
 		scb = (struct orc_scb *) ((unsigned long) host->scb_virt + (unsigned long) (sizeof(struct orc_scb) * scb_index));
 		scb->status = 0x0;
-- 
1.7.11.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-28 23:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-27  8:59 [PATCH] a100u2w: Added sanitization for pointer dereference using a value from hardware. Detected using Carburizer (http://lwn.net/Articles/479653/) Asim Kadav
2012-12-27 11:25 ` James Bottomley
2012-12-27 14:12   ` Asim Kadav
2012-12-27 14:53     ` James Bottomley
2012-12-28 23:03       ` Asim Kadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox