git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[SCSI] gdth: Prevent negative offsets in ioctl CVE-2009-3080
[safe/jmp/linux-2.6]
/
drivers
/
scsi
/
gdth.c
diff --git
a/drivers/scsi/gdth.c
b/drivers/scsi/gdth.c
index
185e6bc
..
9e8fce0
100644
(file)
--- a/
drivers/scsi/gdth.c
+++ b/
drivers/scsi/gdth.c
@@
-2900,7
+2900,7
@@
static int gdth_read_event(gdth_ha_str *ha, int handle, gdth_evt_str *estr)
eindex = handle;
estr->event_source = 0;
- if (eindex >= MAX_EVENTS) {
+ if (eindex
< 0 || eindex
>= MAX_EVENTS) {
spin_unlock_irqrestore(&ha->smp_lock, flags);
return eindex;
}