linux/drivers/media
Sakari Ailus 87bae91a0f media: videobuf2-dma-sg: Prevent size from overflowing
commit 14f28f5cea upstream.

buf->size is an unsigned long; casting that to int will lead to an
overflow if buf->size exceeds INT_MAX.

Fix this by changing the type to unsigned long instead. This is possible
as the buf->size is always aligned to PAGE_SIZE, and therefore the size
will never have values lesser than 0.

Note on backporting to stable: the file used to be under
drivers/media/v4l2-core, it was moved to the current location after 4.14.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-26 09:14:24 +02:00
..
cec media: cec-pin: fix broken tx_ignore_nack_until_eom error injection 2019-01-09 17:38:46 +01:00
common media: videobuf2-dma-sg: Prevent size from overflowing 2019-07-26 09:14:24 +02:00
dvb-core media: dvb_frontend: ensure that the step is ok for both FE and tuner 2018-08-02 18:11:46 -04:00
dvb-frontends tua6100: Avoid build warnings. 2019-07-26 09:14:03 +02:00
firewire media: firewire: Fix app_info parameter type in avc_ca{,_app}_info 2019-01-26 09:32:37 +01:00
i2c media: i2c: fix warning same module names 2019-07-26 09:14:10 +02:00
mmc media: siano: use GFP_DMA only for smssdio 2018-05-15 08:04:42 -04:00
pci media: saa7164: fix remove_proc_entry warning 2019-07-26 09:14:02 +02:00
platform media: coda: Remove unbalanced and unneeded mutex unlock 2019-07-26 09:14:24 +02:00
radio media: wl128x: Fix some error handling in fm_v4l2_init_video_device() 2019-07-26 09:14:03 +02:00
rc media: spi: IR LED: add missing of table registration 2019-07-26 09:13:59 +02:00
spi media: cxd2880-spi: Modified how to declare structure 2018-05-05 10:37:12 -04:00
tuners Merge branch 'i2c/for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-08-21 17:40:46 -07:00
usb media: hdpvr: fix locking and a missing msleep 2019-07-26 09:14:11 +02:00
v4l2-core media: v4l2: Test type instead of cfg->type in v4l2_ctrl_new_custom() 2019-07-26 09:14:24 +02:00
Kconfig media: cec: Kconfig coding style issue 2018-05-09 16:26:50 -04:00
Makefile
media-device.c media: mc-device.c: don't memset __user pointer contents 2019-07-26 09:14:02 +02:00
media-devnode.c MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
media-entity.c media: media.h: reorganize header to make it easier to understand 2018-02-26 10:14:46 -05:00