linux/drivers/isdn
Jeff Garzik 04518bfe8e [PATCH] ISDN: fix drivers, by handling errors thrown by ->readstat()
This is a particularly ugly on-failure bug, possibly security, since the
lack of error handling here is covering up another class of bug: failure to
handle copy_to_user() return values.

The I4L API function ->readstat() returns an integer, and by looking at
several existing driver implementations, it is clear that a negative return
value was meant to indicate an error.

Given that several drivers already return a negative value indicating an
errno-style error, the current code would blindly accept that [negative]
value as a valid amount of bytes read.  Obvious damage ensues.

Correcting ->readstat() handling to properly notice errors fixes the
existing code to work correctly on error, and enables future patches to
more easily indicate errors during operation.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Cc: Karsten Keil <kkeil@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:49 -07:00
..
act2000 drivers/isdn/act2000: kill irq2card_map 2006-10-06 15:04:35 -04:00
capi [PATCH] const struct tty_operations 2006-10-02 07:57:14 -07:00
divert Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
gigaset IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
hardware IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
hisax IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
hysdn [PATCH] drivers/isdn/hysdn: save_flags()/cli(), restore_flags() replaced appropriately 2006-10-17 08:18:48 -07:00
i4l [PATCH] ISDN: fix drivers, by handling errors thrown by ->readstat() 2006-10-17 08:18:49 -07:00
icn [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason 2005-11-09 07:55:57 -08:00
isdnloop [PATCH] drivers/isdn/isdnloop: save_flags()/cli(), restore_flags() replaced appropriately 2006-10-17 08:18:48 -07:00
pcbit [PATCH] ISDN: several minor fixes 2006-10-11 11:14:25 -07:00
sc [PATCH] ISDN: several minor fixes 2006-10-11 11:14:25 -07:00
Kconfig Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile [PATCH] isdn4linux: Siemens Gigaset drivers - Kconfigs and Makefiles 2006-03-26 08:57:05 -08:00