Skip to contentSkip to conversation

eepro: Read buffer overflow

PATCH Applied Roel Kluin 2 participants 2 messages Jul 25, 2009 – Jul 27, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 eepro: Read buffer overflow

io[i] is read before the bounds check on i, order should be reversed

---

drivers/net/eepro.c +0 -0
index cc2ab64..4f70034 100644
@@ -1784,7 +1784,7 @@ int __init init_module(void)
 		printk(KERN_INFO "eepro_init_module: Auto-detecting boards (May God protect us...)

");
}

- for (i = 0; io[i] != -1 && i < MAX_EEPRO; i++) {
+ for (i = 0; i < MAX_EEPRO && io[i] != -1; i++) {
dev = alloc_etherdev(sizeof(struct eepro_local)); if (!dev)
break;