linux-stable/drivers/media/usb/em28xx
Dinghao Liu a26efd1961 media: em28xx: Fix use-after-free in em28xx_alloc_urbs
When kzalloc() fails, em28xx_uninit_usb_xfer() will free
usb_bufs->buf and set it to NULL. Thus the later access
to usb_bufs->buf[i] will lead to null pointer dereference.
Also the kfree(usb_bufs->buf) after that is redundant.

Fixes: d571b592c6 ("media: em28xx: don't use coherent buffer for DMA transfers")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-01-12 18:21:07 +01:00
..
em28xx-audio.c media: em28xx-audio: use semicolons rather than commas to separate statements 2020-11-16 10:31:06 +01:00
em28xx-camera.c MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
em28xx-cards.c media: Implements support for the MyGica iGrabber 2020-08-26 18:52:07 +02:00
em28xx-core.c media: em28xx: Fix use-after-free in em28xx_alloc_urbs 2021-01-12 18:21:07 +01:00
em28xx-dvb.c media: em28xx: Enable Hauppauge 461e rev2 2020-03-12 09:26:18 +01:00
em28xx-i2c.c media: em28xx: fix two smatch warnings 2019-11-08 07:27:14 +01:00
em28xx-input.c media: em28xx: use usb_to_input_id() rather than handrolling it 2019-05-29 12:57:37 -04:00
em28xx-reg.h media: usb: fix several typos 2019-03-01 09:43:27 -05:00
em28xx-v4l.h media: update/fix my e-mail on some places 2018-05-10 07:27:15 -04:00
em28xx-vbi.c media: em28xx: Add SPDX license tags where needed 2018-03-06 05:54:52 -05:00
em28xx-video.c media: media/usb: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:16 +01:00
em28xx.h media: Implements support for the MyGica iGrabber 2020-08-26 18:52:07 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile media: prefix header search paths with $(srctree)/ 2019-05-18 11:49:56 +09:00