linux/drivers/staging/bcm
Dan Carpenter ee2104ea86 staging/bcm: integer underflow leads to Oom
We do:

        if (NOB > DEFAULT_BUFF_SIZE)
                BuffSize = DEFAULT_BUFF_SIZE;
        else
                BuffSize = NOB;

Since NOB can be negative it results in a larger than intended BuffSize
and makes kzalloc() fail.

The code is still a bit crap because it lets the users read as much as
they want from nvram, but I don't know what a sensible upper limit
should be.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18 11:18:10 -08:00
..
Adapter.h staging: bcm : Fix typo in staging/bcm 2014-01-11 12:52:42 -08:00
Bcmchar.c staging/bcm: integer underflow leads to Oom 2014-02-18 11:18:10 -08:00
Bcmnet.c net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
CmHost.c staging: bcm: Remove unnecessary pointer casting 2013-10-29 17:03:40 -07:00
CmHost.h staging: bcm: Replace BOOLEAN with bool 2013-10-28 14:13:08 -07:00
cntrl_SignalingInterface.h
DDRInit.c Staging: bcm: DDRInit: fix up indentation issues. 2014-02-18 11:16:55 -08:00
DDRInit.h
Debug.h
HandleControlPacket.c staging: bcm: Replace FALSE with false 2013-10-28 14:13:46 -07:00
headers.h staging: bcm: remove Version.h file. 2013-08-30 11:46:48 -07:00
hostmibs.c
HostMIBSInterface.h
InterfaceAdapter.h
InterfaceDld.c staging: bcm: line over 80 characters in InterfaceDld.c 2013-12-18 16:24:17 -08:00
InterfaceIdleMode.c staging: bcm: fixed warning about no and prohibited space in InterfaceIdleMode.c. 2013-12-20 11:47:42 -08:00
InterfaceIdleMode.h
InterfaceInit.c staging: bcm: clean up a type issue in ConfigureEndPointTypesThroughEEPROM() 2014-01-09 10:35:25 -08:00
InterfaceInit.h
InterfaceIsr.c staging: bcm: Replace FALSE with false 2013-10-28 14:13:46 -07:00
InterfaceIsr.h
InterfaceMacros.h
InterfaceMisc.c staging: bcm: Replace FALSE with false 2013-10-28 14:13:46 -07:00
InterfaceMisc.h
InterfaceRx.c beeceem: Replace C99 comments with C89 ones and remove unneeded comments in InterfaceRx.c 2014-01-08 15:59:27 -08:00
InterfaceRx.h staging: bcm: Replace BOOLEAN with bool 2013-10-28 14:13:08 -07:00
InterfaceTx.c beeceem: Replace C99-style comments with C89 pendants in InterfaceTx.c 2014-01-08 15:57:33 -08:00
InterfaceTx.h
Ioctl.h staging: bcm: Fix typo in comments 2013-08-23 10:01:43 -07:00
IPv6Protocol.c staging: bcm: Remove unnecessary pointer casting 2013-10-29 17:03:40 -07:00
IPv6ProtocolHdr.h
Kconfig
LeakyBucket.c staging: bcm: Replace FALSE with false 2013-10-28 14:13:46 -07:00
led_control.c staging: bcm: Replace FALSE with false 2013-10-28 14:13:46 -07:00
led_control.h
Macros.h
Makefile
Misc.c staging: bcm: Replace FALSE with false 2013-10-28 14:13:46 -07:00
nvm.c staging: bcm : Fix typo in staging/bcm 2014-01-11 12:52:42 -08:00
nvm.h
PHSDefines.h
PHSModule.c staging: bcm : Fix typo in staging/bcm 2014-01-11 12:52:42 -08:00
PHSModule.h staging: bcm: Replace BOOLEAN with bool 2013-10-28 14:13:08 -07:00
Protocol.h
Prototypes.h staging: bcm: Replace BOOLEAN with bool 2013-10-28 14:13:08 -07:00
Qos.c drivers: bcm: Mark functions as static in Qos.c 2014-01-08 15:46:08 -08:00
Queue.h
sort.c
target_params.h
TODO
Transmit.c staging: bcm: Replace FALSE with false 2013-10-28 14:13:46 -07:00
Typedefs.h staging: bcm: Replace FALSE with false 2013-10-28 14:13:46 -07:00
vendorspecificextn.c staging: bcm: Replace BOOLEAN with bool 2013-10-28 14:13:08 -07:00
vendorspecificextn.h staging: bcm: Replace BOOLEAN with bool 2013-10-28 14:13:08 -07:00