[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-serial
Subject: [patch 3/5] cyclades: fix read buffer overflow
From: akpm () linux-foundation ! org
Date: 2009-08-06 23:08:20
Message-ID: 200908062308.n76N8K2o009716 () imap1 ! linux-foundation ! org
[Download RAW message or body]
From: Roel Kluin <roel.kluin@gmail.com>
irq is declared with size NR_CARDS (4), but the loop containing this
segment runs up until NR_ISA_ADDRS (16), possibly reading from irq[i] (and
trying to use the result)
Identified by the Parfait static scanner.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/char/cyclades.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/char/cyclades.c~cyclades-read-buffer-overflow drivers/char/cyclades.c
--- a/drivers/char/cyclades.c~cyclades-read-buffer-overflow
+++ a/drivers/char/cyclades.c
@@ -3357,7 +3357,7 @@ static int __init cy_detect_isa(void)
continue;
}
#ifdef MODULE
- if (isparam && irq[i])
+ if (isparam && i < NR_CARDS && irq[i])
cy_isa_irq = irq[i];
else
#endif
_
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic