linux-uconsole/drivers/firewire
Stefan Richter 80569f607b firewire: core: add_descriptor size check
Backport of commit e300839da4 upstream.

Presently, firewire-core only checks whether descriptors that are to be
added by userspace drivers to the local node's config ROM do not exceed
a size of 256 quadlets.  However, the sum of the bare minimum ROM plus
all descriptors (from firewire-core, from firewire-net, from userspace)
must not exceed 256 quadlets.

Otherwise, the bounds of a statically allocated buffer will be
overwritten.  If the kernel survives that, firewire-core will
subsequently be unable to parse the local node's config ROM.

(Note, userspace drivers can add descriptors only through device files
of local nodes.  These are usually only accessible by root, unlike
device files of remote nodes which may be accessible to lesser
privileged users.)

Therefore add a test which takes the actual present and required ROM
size into account for all descriptors of kernelspace and userspace
drivers.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-02-09 04:50:52 -08:00
..
core-card.c firewire: core: add_descriptor size check 2010-02-09 04:50:52 -08:00
core-cdev.c headers: remove sched.h from poll.h 2009-10-04 15:05:10 -07:00
core-device.c driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
core-iso.c firewire: core: fix crash in iso resource management 2009-09-05 15:59:34 +02:00
core-topology.c firewire: rename source files 2009-06-05 16:26:18 +02:00
core-transaction.c firewire: core: fix topology map response handler 2009-09-12 14:48:40 +02:00
core.h firewire: core: header file cleanup 2009-09-12 14:48:40 +02:00
Kconfig firewire: new stack is no longer experimental 2009-06-21 10:53:26 +02:00
Makefile firewire: net: add Kconfig item, rename driver 2009-06-14 14:26:29 +02:00
net.c drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
ohci.c firewire: ohci: fix crashes with TSB43AB23 on 64bit systems 2010-02-09 04:50:42 -08:00
ohci.h firewire: reorganize header files 2009-06-05 16:26:18 +02:00
sbp2.c firewire: sbp2: provide fallback if mgt_ORB_timeout is missing 2009-10-14 21:55:19 +02:00