]> git.baikalelectronics.ru Git - kernel.git/commit
media: dvb-usb-v2: lmedm04: Improve logic checking of warm start
authorMalcolm Priestley <tvboxspy@gmail.com>
Tue, 26 Sep 2017 21:10:20 +0000 (17:10 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 11 Dec 2017 12:51:39 +0000 (07:51 -0500)
commit48a095fd9f40728b2a5c517f553589b5cb1c93a1
tree2d799035b8bdcef617c018872129f03ddfe23f46
parentd810a84ae5839d0dcc3db118191ea10bf7cc7790
media: dvb-usb-v2: lmedm04: Improve logic checking of warm start

Warm start has no check as whether a genuine device has
connected and proceeds to next execution path.

Check device should read 0x47 at offset of 2 on USB descriptor read
and it is the amount requested of 6 bytes.

Fix for
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access as

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/dvb-usb-v2/lmedm04.c