linux/drivers/firewire
Stefan Richter 9cac00b8f0 firewire: cdev: fix information leak
A userspace client got to see uninitialized stack-allocated memory if it
specified an _IOC_READ type of ioctl and an argument size larger than
expected by firewire-core's ioctl handlers (but not larger than the
core's union ioctl_arg).

Fix this by clearing the requested buffer size to zero, but only at _IOR
ioctls.  This way, there is almost no runtime penalty to legitimate
ioctls.  The only legitimate _IOR is FW_CDEV_IOC_GET_CYCLE_TIMER with 12
or 16 bytes to memset.

[Another way to fix this would be strict checking of argument size (and
possibly direction) vs. command number.  However, we then need a lookup
table, and we need to allow for slight size deviations in case of 32bit
userland on 64bit kernel.]

Reported-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-04-10 16:51:13 +02:00
..
Kconfig firewire, ieee1394: update Kconfig help 2009-12-29 19:58:17 +01:00
Makefile firewire: net: add Kconfig item, rename driver 2009-06-14 14:26:29 +02:00
core-card.c firewire: core: add_descriptor size check 2010-01-26 20:54:50 +01:00
core-cdev.c firewire: cdev: fix information leak 2010-04-10 16:51:13 +02:00
core-device.c firewire: core: align driver match with modalias 2010-03-24 22:01:47 +01:00
core-iso.c firewire: core: fw_iso_resource_manage: fix error handling 2010-03-15 14:29:44 +01:00
core-topology.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
core-transaction.c firewire: remove incomplete Bus_Time CSR support 2010-02-20 22:33:14 +01:00
core.h firewire: remove incomplete Bus_Time CSR support 2010-02-20 22:33:14 +01:00
net.c firewire: net: fix panic in fwnet_write_complete 2010-02-01 21:51:28 +01:00
ohci.c firewire: ohci: add cycle timer quirk for the TI TSB12LV22 2010-03-17 23:24:42 +01:00
ohci.h firewire: reorganize header files 2009-06-05 16:26:18 +02:00
sbp2.c firewire: qualify config ROM cache pointers as const pointers 2009-12-29 19:58:17 +01:00