* [patch] applicom: use correct array offset
@ 2013-03-01 20:31 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2013-03-01 20:31 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Greg Kroah-Hartman, linux-kernel, kernel-janitors
We're iterating through abps[] printing information, but here we
use the wrong array index. IndexCard comes from the user and in
this case it was specifically not range checked because we didn't
expect to use it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index 25373df..974321a 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -804,8 +804,8 @@ static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
printk(KERN_INFO "Prom version board %d ....... V%d.%d %s",
i+1,
- (int)(readb(apbs[IndexCard].RamIO + VERS) >> 4),
- (int)(readb(apbs[IndexCard].RamIO + VERS) & 0xF),
+ (int)(readb(apbs[i].RamIO + VERS) >> 4),
+ (int)(readb(apbs[i].RamIO + VERS) & 0xF),
boardname);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [patch] applicom: use correct array offset
@ 2013-03-01 20:31 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2013-03-01 20:31 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Greg Kroah-Hartman, linux-kernel, kernel-janitors
We're iterating through abps[] printing information, but here we
use the wrong array index. IndexCard comes from the user and in
this case it was specifically not range checked because we didn't
expect to use it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index 25373df..974321a 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -804,8 +804,8 @@ static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
printk(KERN_INFO "Prom version board %d ....... V%d.%d %s",
i+1,
- (int)(readb(apbs[IndexCard].RamIO + VERS) >> 4),
- (int)(readb(apbs[IndexCard].RamIO + VERS) & 0xF),
+ (int)(readb(apbs[i].RamIO + VERS) >> 4),
+ (int)(readb(apbs[i].RamIO + VERS) & 0xF),
boardname);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] applicom: use correct array offset
2013-03-01 20:31 ` Dan Carpenter
@ 2013-03-01 21:31 ` Arnd Bergmann
-1 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2013-03-01 21:31 UTC (permalink / raw)
To: Dan Carpenter, David Woodhouse
Cc: Greg Kroah-Hartman, linux-kernel, kernel-janitors
On Friday 01 March 2013, Dan Carpenter wrote:
> We're iterating through abps[] printing information, but here we
> use the wrong array index. IndexCard comes from the user and in
> this case it was specifically not range checked because we didn't
> expect to use it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Wow, that is a crappy driver ;-) Dave Woodhouse was apparently the last
person who understood it and had something to do with it, and that was back
in the 90s. It looks like the vendor actually has its own (much worse)
driver for this product line and only supports more recent cards than
our driver does. I doubt that there is anyone using this.
Should we just kill the driver?
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] applicom: use correct array offset
@ 2013-03-01 21:31 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2013-03-01 21:31 UTC (permalink / raw)
To: Dan Carpenter, David Woodhouse
Cc: Greg Kroah-Hartman, linux-kernel, kernel-janitors
On Friday 01 March 2013, Dan Carpenter wrote:
> We're iterating through abps[] printing information, but here we
> use the wrong array index. IndexCard comes from the user and in
> this case it was specifically not range checked because we didn't
> expect to use it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Wow, that is a crappy driver ;-) Dave Woodhouse was apparently the last
person who understood it and had something to do with it, and that was back
in the 90s. It looks like the vendor actually has its own (much worse)
driver for this product line and only supports more recent cards than
our driver does. I doubt that there is anyone using this.
Should we just kill the driver?
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-01 21:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-01 20:31 [patch] applicom: use correct array offset Dan Carpenter
2013-03-01 20:31 ` Dan Carpenter
2013-03-01 21:31 ` Arnd Bergmann
2013-03-01 21:31 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.